Software Library API naibrd 1.62
See all documentation at naii.docs.com
Ethernet Functions

Functions

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetGen (int32_t cardIndex, nai_ether_gen_t etherGen)
 Sets the Ethernet Protocol Generation that should be used to communicate to the board.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Read (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *outdata)
 Ethernet Reads from the board. The data will be truncated if the register is wider than the data width, or padded with zeros if the register is narrower than data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *data)
 Ethernet Writes to the board. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadFifo (int32_t cardIndex, nai_intf_t intf, uint32_t dataaddr, uint32_t countaddr, uint32_t count, uint32_t *countremaining, uint32_t timeout, uint32_t datawidth, void *data, uint32_t *outread)
 Attempts to read a fifo over a specified interface. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are read from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to exceed count before performing the read. If it times out, no data is read. The behavior of this function is not affected by naibrd_SetFifoIOFnc or naibrd_SetMaster.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBlock (int32_t cardIndex, uint16_t blockid, nai_intf_t intf, uint32_t regwidth, uint32_t count, uint32_t address[])
 Defines the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetBlock (int32_t cardIndex, uint16_t blockid, uint32_t arraysize, uint32_t outaddress[], uint32_t *regcount)
 Retrieves the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearBlock (int32_t cardIndex, uint16_t blockid)
 Clears the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t arraysize, uint32_t outdata[], uint32_t *datacount)
 Reads the data from the registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Write data to registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint16_t addrflags[], uint32_t address[])
 Defines the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetZBlock (int32_t cardIndex, uint16_t blockid, uint32_t arraysize, uint16_t outaddrflags[], uint32_t outaddress[], uint32_t *regcount)
 Retrieves the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearZBlock (int32_t cardIndex, uint16_t blockid)
 Clears the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t arraysize, uint32_t outdata[], uint32_t *datacount)
 Reads the data from the registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Write data to registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetTDRConfig (int32_t cardIndex, uint16_t tdrid, uint16_t protocol, uint16_t iplen, uint8_t ip[], uint16_t port, uint16_t period, uint16_t count, uint32_t arraysize, uint8_t command[])
 Defines the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetTDRConfig (int32_t cardIndex, uint16_t tdrid, uint16_t *outprotocol, uint16_t *outiplen, uint8_t outip[], uint16_t *outport, uint16_t *outperiod, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearTDRConfig (int32_t cardIndex, uint16_t tdrid)
 Clears the Time Driven Response Configuration for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartTDR (int32_t cardIndex, uint16_t tdrid)
 Starts the Time Driven Response for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopTDR (int32_t cardIndex, uint16_t tdrid)
 Stops the Time Driven Response for the TDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetIDRConfig (int32_t cardIndex, uint16_t idrid, uint16_t protocol, uint16_t iplen, uint8_t ip[], uint16_t port, uint32_t vector, uint16_t count, uint32_t arraysize, uint8_t command[])
 Defines the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetIDRConfig (int32_t cardIndex, uint16_t idrid, uint16_t *outprotocol, uint16_t *outiplen, uint8_t outip[], uint16_t *outport, uint32_t *outvector, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearIDRConfig (int32_t cardIndex, uint16_t idrid)
 Clears the Interrupt Driven Response Configuration for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartIDR (int32_t cardIndex, uint16_t idrid)
 Starts the Interrupt Driven Response for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopIDR (int32_t cardIndex, uint16_t idrid)
 Stops the Interrupt Driven Response for the IDR ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteScript (int32_t cardIndex, uint16_t scriptid, uint16_t cmdcount, uint32_t arraysize, uint8_t command[])
 Defines the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadScript (int32_t cardIndex, uint16_t scriptid, uint16_t *outcount, uint32_t arraysize, uint8_t outcommand[])
 Retrieves the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearScript (int32_t cardIndex, uint16_t scriptid)
 Clears the commands for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_RunScript (int32_t cardIndex, uint16_t scriptid, int32_t cmdcount, int32_t dataSz, int32_t *dataLen, uint8_t *data)
 Runs the command for the Script ID specified. Returns any values returned from the script.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ExecuteScript (int32_t cardIndex, uint16_t scriptid)
 Executes the command for the Script ID specified.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetSafeStateScriptId (int32_t cardIndex, uint16_t scriptid)
 Sets the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetSafeStateScriptId (int32_t cardIndex, uint16_t *outscriptid)
 Retrieves the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_NOP (int32_t cardIndex)
 Ethernet NOP Command - This command communicates to the board for connection testing or synchronous idle. Compatible with all generation of boards that support Ethernet.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetNoCommsWatchdogTimer (int32_t cardIndex, uint32_t max_sec_between_ether_comm)
 Sets the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetNoCommsWatchdogTimer (int32_t cardIndex, uint32_t *outmax_sec_between_ether_comm)
 Retrieves the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write_NoReply (int32_t cardIndex, nai_intf_t intf, uint32_t regwidth, uint32_t address, uint32_t stride, uint32_t count, uint32_t datawidth, void *data)
 Same functionality as the Ethernet Writes to the board, however, with this Ethernet Write command the board will does not return any responses. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock_NoReply (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Same functionality as the Ethernet Write data to registers defined in the Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Block is a list of register addresses to be read or written in a single operation.
 
NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock_NoReply (int32_t cardIndex, uint16_t blockid, uint32_t regwidth, uint32_t count, uint32_t data[])
 Same functionality as the Ethernet Write data to registers defined in the Z-Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.
 

Detailed Description


Function Documentation

◆ naibrd_Ether_ClearBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearBlock ( int32_t cardIndex,
uint16_t blockid )

Clears the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ClearIDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearIDRConfig ( int32_t cardIndex,
uint16_t idrid )

Clears the Interrupt Driven Response Configuration for the IDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
idrid: (Input) Interrupt Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ClearScript()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearScript ( int32_t cardIndex,
uint16_t scriptid )

Clears the commands for the Script ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ClearTDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearTDRConfig ( int32_t cardIndex,
uint16_t tdrid )

Clears the Time Driven Response Configuration for the TDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
tdrid: (Input) Time Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ClearZBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ClearZBlock ( int32_t cardIndex,
uint16_t blockid )

Clears the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ExecuteScript()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ExecuteScript ( int32_t cardIndex,
uint16_t scriptid )

Executes the command for the Script ID specified.

Deprecated
This function has been superceeded by naibrd_Ether_RunScript().
Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t arraysize,
uint32_t outaddress[],
uint32_t * regcount )

Retrieves the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
arraysize: (Input) Array size of address buffer.
outaddress: (Output) List of Register Addresses.
regcount: (Output) The total number of registers retrieved in the block.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetIDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetIDRConfig ( int32_t cardIndex,
uint16_t idrid,
uint16_t * outprotocol,
uint16_t * outiplen,
uint8_t outip[],
uint16_t * outport,
uint32_t * outvector,
uint16_t * outcount,
uint32_t arraysize,
uint8_t outcommand[] )

Retrieves the Interrupt Driven Response Configuration for the IDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
idrid: (Input) Interrupt Driven Response ID.
outprotocol: (Output) Response Protocol (Valid values: TCP=0 or UDP=1).
outiplen: (Output) Response IP Address Length (Valid values: IPv4=4 or IPv6=6).
outip: (Output) Response Address (Destination IPv4 or IPv6 Address).
outport: (Output) Response Port (Destination Port).
outvector: (Output) Interrupt Vector (Valid values: 1-MAX_ETHER_GEN4_IDR_VECTOR).
outcount: (Output) Number of commands to execute.
arraysize: (Input) Size of the outcommand array.
outcommand: (Output) Commands to execute (Valid commands: ReadRegs, WriteRegs, ReadBlock and WriteBlock).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetNoCommsWatchdogTimer()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetNoCommsWatchdogTimer ( int32_t cardIndex,
uint32_t * outmax_sec_between_ether_comm )

Retrieves the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.

For example, if the Timeout is set to a value of 10 decimal, then the Watchdog will trigger when 10 seconds has elapsed since the last Ethernet Op Code communication. If other messages are received (such as ping), in this time window, they do not count and the timer will still trigger. In other words, this timer is for Ethernet Op Mode communication only, NOT ALL communications. Upon triggering, the Script ID designated as the Safe State Script will execute.

The timer is a 1-shot timer. Once triggered, this timer value will be reset to zero. Reprogramming the timer value will re-arm the trigger mechanism.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
outmax_sec_between_ether_comm: (Output) Maximum time in seconds between Ethernet Op Mode communication before triggering.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetSafeStateScriptId()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetSafeStateScriptId ( int32_t cardIndex,
uint16_t * outscriptid )

Retrieves the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
outscriptid: (Output) Script ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetTDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetTDRConfig ( int32_t cardIndex,
uint16_t tdrid,
uint16_t * outprotocol,
uint16_t * outiplen,
uint8_t outip[],
uint16_t * outport,
uint16_t * outperiod,
uint16_t * outcount,
uint32_t arraysize,
uint8_t outcommand[] )

Retrieves the Time Driven Response Configuration for the TDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
tdrid: (Input) Time Driven Response ID.
outprotocol: (Output) Response Protocol (Valid values: TCP=0 or UDP=1).
outiplen: (Output) Response IP Address Length (Valid values: IPv4=4 or IPv6=6).
outip: (Output) Response Address (Destination IPv4 or IPv6 Address).
outport: (Output) Response Port (Destination Port).
outperiod: (Output) Period in milliseconds between responses (Valid values: 40-65535).
outcount: (Output) Number of commands to execute.
arraysize: (Input) Size of the outcommand array.
outcommand: (Output) Commands to execute (Valid commands: ReadRegs, WriteRegs, ReadBlock and WriteBlock).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_GetZBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_GetZBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t arraysize,
uint16_t outaddrflags[],
uint32_t outaddress[],
uint32_t * regcount )

Retrieves the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
arraysize: (Input) Array size of address buffer.
outaddrflags: (Output) List of Address Flags (on-board or off-board) associated with list of register addresses.
outaddress: (Output) List of Register Addresses.
regcount: (Output) The total number of registers retrieved in the block.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_NOP()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_NOP ( int32_t cardIndex)

Ethernet NOP Command - This command communicates to the board for connection testing or synchronous idle. Compatible with all generation of boards that support Ethernet.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_CONNECTION_LOST if ethernet fails (TCP).
  • NAI_ERROR_COMM_ERROR if ethernet fails (UDP).
  • NAI_ERROR_LOCK_FAILED when mutex fails to lock.

◆ naibrd_Ether_Read()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Read ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t datawidth,
void * outdata )

Ethernet Reads from the board. The data will be truncated if the register is wider than the data width, or padded with zeros if the register is narrower than data width.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start reading from.
stride: (Input) The amount to increment the address after each individual read.
count: (Input) The total number of elements to read.
datawidth: (Input) The width of the elements in data, in bytes.
outdata: (Output) The array to receive the values of the registers.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ReadBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t arraysize,
uint32_t outdata[],
uint32_t * datacount )

Reads the data from the registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
arraysize: (Input) Array size of address buffer.
outdata: (Output) List of Register Data.
datacount: (Output) The total number of registers data elements retrieved in the block.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ReadFifo()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadFifo ( int32_t cardIndex,
nai_intf_t intf,
uint32_t dataaddr,
uint32_t countaddr,
uint32_t count,
uint32_t * countremaining,
uint32_t timeout,
uint32_t datawidth,
void * data,
uint32_t * outread )

Attempts to read a fifo over a specified interface. If timeout is set to NAIBRD_FIFO_TIMEOUT_NONE, the operation does not block and up to count words are read from the fifo. Otherwise, the operation waits up to timeout milliseconds for the FIFO's count to exceed count before performing the read. If it times out, no data is read. The behavior of this function is not affected by naibrd_SetFifoIOFnc or naibrd_SetMaster.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
dataaddr: (Input) The address of the FIFO's data register.
countaddr: (Input) The address of the FIFO's count register.
count: (Input) The number of elements to read from the FIFO.
countremaining: (Output) The number of elements remaining in the FIFO.
timeout: (Input) The amount of time, in milliseconds, to wait for the FIFO's count to reach count before timing out.
datawidth: (Input) The width of the elements in data, in bytes.
data: (Output) An array to store the values read.
outread: (Output) The number of elements read.
Returns
  • NAI_SUCCESS when the board is ready.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_INVALID_MODULE when the module number is invalid.
  • An error returned by naibrd_BusRead or internal IO functions.

◆ naibrd_Ether_ReadScript()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadScript ( int32_t cardIndex,
uint16_t scriptid,
uint16_t * outcount,
uint32_t arraysize,
uint8_t outcommand[] )

Retrieves the commands for the Script ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
outcount: (Output) Number of commands to execute.
arraysize: (Input) Size of the outcommand array.
outcommand: (Output) Commands to execute (Valid commands: ReadRegs, WriteRegs, ReadBlock and WriteBlock).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_ReadZBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_ReadZBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t arraysize,
uint32_t outdata[],
uint32_t * datacount )

Reads the data from the registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
arraysize: (Input) Array size of address buffer.
outdata: (Output) List of Register Data.
datacount: (Output) The total number of registers data elements retrieved in the block.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_RunScript()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_RunScript ( int32_t cardIndex,
uint16_t scriptid,
int32_t cmdcount,
int32_t dataSz,
int32_t * dataLen,
uint8_t * data )

Runs the command for the Script ID specified. Returns any values returned from the script.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
cmdcount: (Input) Number of commands in the script.
dataSz: (Input) Size of buffer to be passed (data).
dataLen: (Output) Contains the length of the data stored
data: (Output) Pointer to a user defined buffer of size dataSz that will contain the data returned from running the script.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.
  • NAI_ERROR_LOCK_FAILED when mutex fails to acquire a lock.
  • NAI_ERROR_OVERFLOW when dataSz is not sufficient to hold responses in the buffer.

◆ naibrd_Ether_SetBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetBlock ( int32_t cardIndex,
uint16_t blockid,
nai_intf_t intf,
uint32_t regwidth,
uint32_t count,
uint32_t address[] )

Defines the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block (1 - MAX_ETHER_BLOCK_REG_CNT).
address: (Input) List of Register Addresses.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetGen()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetGen ( int32_t cardIndex,
nai_ether_gen_t etherGen )

Sets the Ethernet Protocol Generation that should be used to communicate to the board.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
etherGen: (Input) Generation of the ethernet protocol to use.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetIDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetIDRConfig ( int32_t cardIndex,
uint16_t idrid,
uint16_t protocol,
uint16_t iplen,
uint8_t ip[],
uint16_t port,
uint32_t vector,
uint16_t count,
uint32_t arraysize,
uint8_t command[] )

Defines the Interrupt Driven Response Configuration for the IDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
idrid: (Input) Interrupt Driven Response ID.
protocol: (Input) Response Protocol (Valid values: TCP=0 or UDP=1).
iplen: (Input) Response IP Address Length (Valid values: IPv4=4 or IPv6=6).
ip: (Input) Response Address (Destination IPv4 or IPv6 Address).
port: (Input) Response Port (Destination Port).
vector: (Input) Interrupt vector (Valid values: 1-MAX_ETHER_GEN4_IDR_VECTOR).
count: (Input) Number of commands to execute.
arraysize: (Input) Size of the outcommand array.
command: (Input) Commands to execute (Valid commands: ReadRegs, WriteRegs, ReadBlock and WriteBlock).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetNoCommsWatchdogTimer()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetNoCommsWatchdogTimer ( int32_t cardIndex,
uint32_t max_sec_between_ether_comm )

Sets the maximum number of seconds between Ethernet Op Mode communications. Ethernet Op Mode communications refers only to those messages received by the EtherOpMode Listener application on one of the 4 ports (TCP/UDP 52801/52802. Other active Ethernet protocols do not count toward the timeout count.

For example, if the Timeout is set to a value of 10 decimal, then the Watchdog will trigger when 10 seconds has elapsed since the last Ethernet Op Code communication. If other messages are received (such as ping), in this time window, they do not count and the timer will still trigger. In other words, this timer is for Ethernet Op Mode communication only, NOT ALL communications. Upon triggering, the Script ID designated as the Safe State Script will execute.

The timer is a 1-shot timer. Once triggered, this timer value will be reset to zero. Reprogramming the timer value will re-arm the trigger mechanism.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
max_sec_between_ether_comm: (Input) Maximum time in seconds between Ethernet Op Mode communication before triggering.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetSafeStateScriptId()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetSafeStateScriptId ( int32_t cardIndex,
uint16_t scriptid )

Sets the Script ID to be designated as the Safe State Script. The Safe Safe Script is executed when the Safe Safe EtherOpMode Communication Timeout criteria event occurs.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetTDRConfig()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetTDRConfig ( int32_t cardIndex,
uint16_t tdrid,
uint16_t protocol,
uint16_t iplen,
uint8_t ip[],
uint16_t port,
uint16_t period,
uint16_t count,
uint32_t arraysize,
uint8_t command[] )

Defines the Time Driven Response Configuration for the TDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
tdrid: (Input) Time Driven Response ID.
protocol: (Input) Response Protocol (Valid values: TCP=0 or UDP=1).
iplen: (Input) Response IP Address Length (Valid values: IPv4=4 or IPv6=6).
ip: (Input) Response Address (Destination IPv4 or IPv6 Address).
port: (Input) Response Port (Destination Port).
period: (Input) Period in milliseconds between responses (Valid values: 40-65535).
count: (Input) Number of commands to execute.
arraysize: (Input) Size of the command array.
command: (Input) Commands to execute (Valid commands: ReadRegs, WriteRegs, ReadBlock and WriteBlock).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_SetZBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_SetZBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t count,
uint16_t addrflags[],
uint32_t address[] )

Defines the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block (1 - MAX_ETHER_BLOCK_REG_CNT).
addrflags: (Input) List of Address Flags (on-board or off-board) associated with list of register addresses.
address: (Input) List of Register Addresses.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_StartIDR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartIDR ( int32_t cardIndex,
uint16_t idrid )

Starts the Interrupt Driven Response for the IDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
idrid: (Input) Interrupt Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_StartTDR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StartTDR ( int32_t cardIndex,
uint16_t tdrid )

Starts the Time Driven Response for the TDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
tdrid: (Input) Time Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_StopIDR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopIDR ( int32_t cardIndex,
uint16_t idrid )

Stops the Interrupt Driven Response for the IDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
idrid: (Input) Interrupt Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_StopTDR()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_StopTDR ( int32_t cardIndex,
uint16_t tdrid )

Stops the Time Driven Response for the TDR ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
tdrid: (Input) Time Driven Response ID.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_Write()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t datawidth,
void * data )

Ethernet Writes to the board. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start reading from.
stride: (Input) The amount to increment the address after each individual read.
count: (Input) The total number of elements to read.
datawidth: (Input) The width of the elements in data, in bytes.
data: (Output) The array to receive the values of the registers.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_Write_NoReply()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_Write_NoReply ( int32_t cardIndex,
nai_intf_t intf,
uint32_t regwidth,
uint32_t address,
uint32_t stride,
uint32_t count,
uint32_t datawidth,
void * data )

Same functionality as the Ethernet Writes to the board, however, with this Ethernet Write command the board will does not return any responses. The data will be padded with zeros if the register is wider than the data width, or truncated if the register is narrower than the data width.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
intf: (Input) The interface to perform the read on.
regwidth: (Input) The width of the underlying registers.
address: (Input) The address to start reading from.
stride: (Input) The amount to increment the address after each individual read.
count: (Input) The total number of elements to read.
datawidth: (Input) The width of the elements in data, in bytes.
data: (Output) The array to receive the values of the registers.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_WriteBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t count,
uint32_t data[] )

Write data to registers defined in the Block Configuration for the Block ID specified. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block.
data: (Input) List of Register Data.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_WriteBlock_NoReply()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteBlock_NoReply ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t count,
uint32_t data[] )

Same functionality as the Ethernet Write data to registers defined in the Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Block is a list of register addresses to be read or written in a single operation.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block.
data: (Input) List of Register Data.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_WriteScript()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteScript ( int32_t cardIndex,
uint16_t scriptid,
uint16_t cmdcount,
uint32_t arraysize,
uint8_t command[] )

Defines the commands for the Script ID specified.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
scriptid: (Input) Script ID.
cmdcount: (Input) Number of commands to execute.
arraysize: (Input) Size of the command array.
command: (Input) Commands to execute (Valid commands: NOP, ReadRegs, WriteRegs, ReadFIFO, MaskReg, and MaskValueReg).
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_WriteZBlock()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t count,
uint32_t data[] )

Write data to registers defined in the Z-Block Configuration for the Block ID specified. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block.
data: (Input) List of Register Data.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.

◆ naibrd_Ether_WriteZBlock_NoReply()

NAIBRDFUNC nai_status_t NAIAPI naibrd_Ether_WriteZBlock_NoReply ( int32_t cardIndex,
uint16_t blockid,
uint32_t regwidth,
uint32_t count,
uint32_t data[] )

Same functionality as the Ethernet Write data to registers defined in the Z-Block Configuration for the Block ID specified, however, with this Ethernet Write Block command the board will does not return any responses. A Z-Block is a list of register addresses to be read or written in a single operation. Z-Blocks are similar to the regular Block Configuration with a single difference: Z-Blocks may contain on-board and off-board addresses in a single block. The regular Block is restricted to all on-board or all off-board register addresses.

Parameters
cardIndex: (Input) Logical Card Index assigned to connection with the NAI_BOARD (0 - NAI_MAX_CARDS-1).
blockid: (Input) Block ID.
regwidth: (Input) The width of the underlying registers.
count: (Input) The total number of registers defined in the block.
data: (Input) List of Register Data.
Returns
  • NAI_SUCCESS
  • NAI_ERROR_INVALID_VALUE when invalid parameters are specified.
  • NAI_ERROR_INVALID_CARD when invalid card parameter is specified.
  • NAI_ERROR_NOT_OPEN when handle to board is invalid.
  • NAI_ERROR_NOT_SUPPORTED when function is not supported.