OpenDOF Project
DOSStatus DOS_Init ( uint8 sendBuffer,
DOSBufferSize  bufferSize 
)

Initialize the COS.

This must be called before making any calls into COS. The DOSConfig structure must contain the configuration of the node. The Source ID in the config must be unique within the network, and should not have been used in the recent past (e.g., after a reboot that did not send a Node Down). If the last Source ID used is known, the application should call DOS_CancelAll with the old ID to let other network nodes remove any stale operations. If the last Source ID is not known and there is a chance the current Source ID may have been used recently, the application must call DOS_NodeDown.

This call initializes the DOSContext. The send buffer supplied to this call is set into DOSContext.SendBuffer and DOSContext.SendBufferSize. The buffer must be large enough for any packet sourced by the application (including both commands and responses), and must exceed DOSContext.MinPacketSize by at least 3 bytes. Recommended to be at least 128 bytes.

Parameters
sendBufferThe buffer to use for sending data. This must not be NULL.
bufferSizeThe size of sendBuffer.
Returns
DOSSTATUS_SUCCESS on success or any of the DOSSTATUS errors on failure.
core-c-cos Version 7.0.1 Build 0
2018-02-08