Software Library API naibrd 1.62
See all documentation at naii.docs.com
|
Functions | |
NAIFUNC int32_t NAIAPI | nai_ether_FinishMessage (uint8_t msgbuf[], int32_t offset, nai_ether_gen_t gen) |
Handles filling in the message size field and the postamble fields in the message buffer. | |
NAIFUNC int32_t NAIAPI | nai_ether_DecodeMessageHeader (const uint8_t msg[], int32_t msgsize, uint16_t *seq, nai_ether_typecode_t *typecode, nai_ether_gen_t gen, int32_t *size) |
Handles decoding the Ethernet Message Header and extracting the sequence number, type code and message size. | |
NAIFUNC int32_t NAIAPI | nai_ether_BeginWriteMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, nai_intf_t intf, uint32_t addr, uint32_t stride, uint32_t count, uint32_t datawidth) |
Handles filling in the message buffer with the data associated with the Ethernet Write Registers message. The data to be written to the Ethernet Write Registers message is handled by calling nai_ether_WriteMessageData(). | |
NAIFUNC int32_t NAIAPI | nai_ether_BeginWriteNoReplyMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, nai_intf_t intf, uint32_t addr, uint32_t stride, uint32_t count, uint32_t datawidth) |
Handles filling in the message buffer with the data associated with the Ethernet Write with No Reply Registers message. The data to be written to the Ethernet Write No Reply Registers message is handled by calling nai_ether_WriteMessageData(). | |
NAIFUNC int32_t NAIAPI | nai_ether_MakeNopMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen) |
Handles filling in the message buffer with the data associated with the Ethernet NOP message. | |
NAIFUNC int32_t NAIAPI | nai_ether_MakeReadMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, nai_intf_t intf, uint32_t addr, uint32_t stride, uint32_t count, uint32_t datawidth) |
Handles filling in the message buffer with the data associated with the Ethernet Read Registers message. | |
NAIFUNC int32_t NAIAPI | nai_ether_DecodeReadMessage (nai_ether_typecode_t typecode, nai_ether_gen_t gen, const uint8_t msg[], int32_t offset, uint32_t *count, uint32_t *regwidth, void *buffer, uint32_t bufferwidth, uint32_t buffercnt) |
Handles decoding the Ethernet Read Message and extracting the count, register width and start of the data. | |
NAIFUNC int32_t NAIAPI | nai_ether_MakeReadBlockMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, uint16_t blockid) |
Handles filling in the message buffer with the data associated with the Ethernet Read Block message. | |
NAIFUNC int32_t NAIAPI | nai_ether_MakeWriteBlockMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[]) |
Handles filling in the message buffer with the data associated with the Ethernet Write Block message. | |
NAIFUNC int32_t NAIAPI | nai_ether_MakeWriteNoReplyBlockMessage (uint8_t msgbuf[], uint16_t seq, nai_ether_gen_t gen, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[]) |
Handles filling in the message buffer with the data associated with the Ethernet Write Block with No Reply message. | |
NAIFUNC int32_t NAIAPI | nai_ether_WriteMessageData (uint8_t msgbuf[], int32_t offset, uint32_t msgdatawidth, const void *data, uint32_t datawidth, uint32_t count) |
Handles filling in the message buffer with the data values associated with the Ethernet Write Registers message. | |
NAIFUNC int32_t NAIAPI nai_ether_BeginWriteMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
nai_intf_t | intf, | ||
uint32_t | addr, | ||
uint32_t | stride, | ||
uint32_t | count, | ||
uint32_t | datawidth ) |
Handles filling in the message buffer with the data associated with the Ethernet Write Registers message. The data to be written to the Ethernet Write Registers message is handled by calling nai_ether_WriteMessageData().
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
intf | : (Input) Refer to nai_intf_t for valid interface types. |
addr | : (Input) Register Address. |
stride | : (Input) Number of bytes to increment the register addressing for each consecutive read. |
count | : (Input) Number of Register Size reads to perform. |
datawidth | : (Input) Data width specified in bytes. |
NAIFUNC int32_t NAIAPI nai_ether_BeginWriteNoReplyMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
nai_intf_t | intf, | ||
uint32_t | addr, | ||
uint32_t | stride, | ||
uint32_t | count, | ||
uint32_t | datawidth ) |
Handles filling in the message buffer with the data associated with the Ethernet Write with No Reply Registers message. The data to be written to the Ethernet Write No Reply Registers message is handled by calling nai_ether_WriteMessageData().
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code - Only Gen 4 supports this feature. |
intf | : (Input) Refer to nai_intf_t for valid interface types. |
addr | : (Input) Register Address. |
stride | : (Input) Number of bytes to increment the register addressing for each consecutive read. |
count | : (Input) Number of Register Size reads to perform. |
datawidth | : (Input) Data width specified in bytes. |
NAIFUNC int32_t NAIAPI nai_ether_DecodeMessageHeader | ( | const uint8_t | msg[], |
int32_t | msgsize, | ||
uint16_t * | seq, | ||
nai_ether_typecode_t * | typecode, | ||
nai_ether_gen_t | gen, | ||
int32_t * | size ) |
Handles decoding the Ethernet Message Header and extracting the sequence number, type code and message size.
msg | : (Input) Message buffer to decode. |
msgsize | : (Input) Number of bytes in message buffer. |
seq | : (Output) Sequence number retrieved from message buffer. |
typecode | : (Output) Type code retrieved from message buffer. |
gen | : (Input) Ethernet message generation code. |
size | : (Output) Message size retrieved from message buffer. |
NAIFUNC int32_t NAIAPI nai_ether_DecodeReadMessage | ( | nai_ether_typecode_t | typecode, |
nai_ether_gen_t | gen, | ||
const uint8_t | msg[], | ||
int32_t | offset, | ||
uint32_t * | count, | ||
uint32_t * | regwidth, | ||
void * | buffer, | ||
uint32_t | bufferwidth, | ||
uint32_t | buffercnt ) |
Handles decoding the Ethernet Read Message and extracting the count, register width and start of the data.
typecode | : (Input) Type code retrieved from message buffer. |
gen | : (Input) Ethernet message generation code. |
msg | : (Input) Message buffer to decode. |
offset | : (Input) Index to the Message buffer to start decoding. |
count | : (Output) Number of data elements in the message buffer. |
regwidth | : (Output) Register width specified in bytes. |
buffer | : (Output) Data buffer. |
bufferwidth | : (Input) Data width. |
buffercnt | : (Input) Size of Data buffer. |
NAIFUNC int32_t NAIAPI nai_ether_FinishMessage | ( | uint8_t | msgbuf[], |
int32_t | offset, | ||
nai_ether_gen_t | gen ) |
Handles filling in the message size field and the postamble fields in the message buffer.
msgbuf | : (Input) Message buffer to fill with the message size and postamble elements. |
offset | : (Input) Index where the postamble field should be written. |
gen | : (Input) Ethernet message generation code. |
NAIFUNC int32_t NAIAPI nai_ether_MakeNopMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen ) |
Handles filling in the message buffer with the data associated with the Ethernet NOP message.
msgbuf | : (Input) Message buffer to fill with the Ethernet NOP elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
NAIFUNC int32_t NAIAPI nai_ether_MakeReadBlockMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
uint16_t | blockid ) |
Handles filling in the message buffer with the data associated with the Ethernet Read Block message.
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
blockid | : (Input) Block ID. |
NAIFUNC int32_t NAIAPI nai_ether_MakeReadMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
nai_intf_t | intf, | ||
uint32_t | addr, | ||
uint32_t | stride, | ||
uint32_t | count, | ||
uint32_t | datawidth ) |
Handles filling in the message buffer with the data associated with the Ethernet Read Registers message.
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
intf | : (Input) Refer to nai_intf_t for valid interface types. |
addr | : (Input) Register Address. |
stride | : (Input) Number of bytes to increment the register addressing for each consecutive read. |
count | : (Input) Number of Register Size reads to perform. |
datawidth | : (Input) Data width specified in bytes. |
NAIFUNC int32_t NAIAPI nai_ether_MakeWriteBlockMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
uint16_t | blockid, | ||
uint32_t | regwidth, | ||
uint32_t | count, | ||
uint32_t | data[] ) |
Handles filling in the message buffer with the data associated with the Ethernet Write Block message.
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
blockid | : (Input) Block ID. |
regwidth | : (Input) Register width specified in bytes. |
count | : (Input) Number of Register Size writes to perform. |
data | : (Input) Data values. |
NAIFUNC int32_t NAIAPI nai_ether_MakeWriteNoReplyBlockMessage | ( | uint8_t | msgbuf[], |
uint16_t | seq, | ||
nai_ether_gen_t | gen, | ||
uint16_t | blockid, | ||
uint32_t | regwidth, | ||
uint32_t | count, | ||
uint32_t | data[] ) |
Handles filling in the message buffer with the data associated with the Ethernet Write Block with No Reply message.
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
seq | : (Input) Sequence number. |
gen | : (Input) Ethernet message generation code. |
blockid | : (Input) Block ID. |
regwidth | : (Input) Register width specified in bytes. |
count | : (Input) Number of Register Size writes to perform. |
data | : (Input) Data values. |
NAIFUNC int32_t NAIAPI nai_ether_WriteMessageData | ( | uint8_t | msgbuf[], |
int32_t | offset, | ||
uint32_t | msgdatawidth, | ||
const void * | data, | ||
uint32_t | datawidth, | ||
uint32_t | count ) |
Handles filling in the message buffer with the data values associated with the Ethernet Write Registers message.
msgbuf | : (Input) Message buffer to fill with the Ethernet Read Registers elements. |
offset | : (Input) Index where the data values should be written to in the Message buffer. |
msgdatawidth | : (Input) Register size in bytes. |
data | : (Input) Data values. |
datawidth | : (Input) Data size in bytes. |
count | : (Input) Number of Register Size writes to perform. |