xrdndndpdkconsumer

package
v0.0.0-...-528efda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LCoreRole_Input      = "RX"
	LCoreRole_Output     = "TX"
	LCoreRole_ConsumerRx = "ConsumerRx"
	LCoreRole_ConsumerTx = "ConsumerTx"
)

LCoreAlloc roles

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// contains filtered or unexported fields
}

App struct

func New

func New(initCfgConsumer InitConfigConsumer) (app *App, e error)

New App object instance

func (*App) Close

func (app *App) Close() (e error)

Close App

func (*App) Launch

func (app *App) Launch() error

Launch App

func (*App) Run

func (app *App) Run() (e error)

Run App

func (*App) TransferFile

func (app *App) TransferFile(filepath string) (e error)

TransferFile over NDN

type Consumer

type Consumer struct {
	Rx ealthread.Thread
	Tx ealthread.Thread
	// contains filtered or unexported fields
}

Consumer Instance and threads

func NewConsumer

func NewConsumer(face iface.Face, settings ConsumerSettings) (*Consumer, error)

NewConsumer objet

func (*Consumer) Close

func (consumer *Consumer) Close() error

Close the consumer Both RX and TX threads must be stopped before calling this.

func (*Consumer) Configure

func (consumer *Consumer) Configure(settings ConsumerSettings) error

Configure consumer instance

func (*Consumer) ConfigureDemux

func (consumer *Consumer) ConfigureDemux(demuxI, demuxD, demuxN *iface.InputDemux)

ConfigureDemux for Consumer instance

func (*Consumer) FileInfo

func (consumer *Consumer) FileInfo(pathname string) (filesize int64, e error)

FileInfo file

func (*Consumer) GetCounters

func (consumer *Consumer) GetCounters() (cnt Counters)

GetCounters Get Rx and Tx consumer counters

func (*Consumer) Launch

func (consumer *Consumer) Launch()

Launch the RX thread

func (*Consumer) Read

func (consumer *Consumer) Read(pathname string, buf *C.uint8_t, count int64, offset int64) (nbytes int64, e error)

Read from file

func (*Consumer) RequestData

func (consumer *Consumer) RequestData(pathname string, count int64, offset int64, pt C.PacketType) int

RequestData over NDN

func (*Consumer) ResetCounters

func (consumer *Consumer) ResetCounters()

ResetCounters Reset Rx and Tx Consumer thread counters for statistics

func (*Consumer) RxQueue

func (consumer *Consumer) RxQueue() *iface.PktQueue

RxQueue from Consumer instance

func (*Consumer) SetLCores

func (consumer *Consumer) SetLCores(rxLCore, txLCore eal.LCore)

SetLCores for Consumer instane

func (*Consumer) Stop

func (consumer *Consumer) Stop() error

Stop Rx and TX threads

type ConsumerSettings

type ConsumerSettings struct {
	MustBeFresh      bool          // Whether to set MustBeFresh
	InterestLifetime time.Duration // InterestLifetime value, zero means default
	RxQueue          iface.PktQueueConfig
}

ConsumerSettings config

type Counters

type Counters struct {
	// contains filtered or unexported fields
}

Counters for Consumer Rx and Tx threads

type InitConfigConsumer

type InitConfigConsumer struct {
	Face     iface.LocatorWrapper // Face locator for face creation
	Consumer *ConsumerSettings    // If not nil, create a consumer on the face
	Files    []string             // List of files to be copied over NDN by this consumer applications
}

InitConfigConsumer config

type Input

type Input struct {
	// contains filtered or unexported fields
}

Input struct

type MessageRx

type MessageRx struct {
	Error      bool
	Value      int64
	SegmentNum int64
}

MessageRx struct between Go and C (Rx Thread/s)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL