SCOM Serial Communication Protocol
0.5.2
|
Main API file. More...
Go to the source code of this file.
Macros | |
#define | HAL_LOG_CHANNEL SCOM |
#define | SCOM_MAX_FRAME_REPEAT 2 |
Maximum number of retransmissions, before communication error is raised. More... | |
#define | SCOM_ACCESS_GUARD_TIMEOUT 5000 |
Main API file.
SCOM Serial communication protocol.
Definition in file scom.c.
#define SCOM_ACCESS_GUARD_TIMEOUT 5000 |
Defines waiting time for SCOM access mutex in SCOM_Proc function.
Definition at line 25 of file scom.c.
Referenced by SCOM_GetConnectionState(), SCOM_GetStatistics(), SCOM_Proc(), SCOM_ResetStatistics(), SCOM_SetAckReceptionHandlerFunc(), and SCOM_SetFrameReceptionHandlerFunc().
#define SCOM_MAX_FRAME_REPEAT 2 |
SCOMResult SCOM_AllocFrame | ( | SCOMDataLink | scom, |
SCOMFrame ** | framePtr | ||
) |
Allocates new frame in the internal SCOM frame buffer, to allow direct access to SCOMFrame structure and avoid unnecessary copying of data. The allocated frame can later be sent using SCOM_SendAllocatedFrame or deleted using SCOM_UnlockFrame.
scom | SCOM handle |
framePtr | pointer to variable, where a pointer to an allocated SCOMFrame structure will be stored |
SCOM_RESULT_OK | on success - the framePtr holds a valid pointer to SCOMFrame |
SCOM_TX_FULL | if there is no more free space to allocate frame in the frame buffer |
SCOM_ERROR | if other error occurred |
Definition at line 706 of file scom.c.
References SCOMFrameQueueItem::frame, SCOMDataLinkDesc::frameBuffer, SCOM_ERROR, SCOM_RESULT_OK, SCOM_TX_FULL, SCOMFrameQueue_Lock(), and SCOMFrameBuffer::txFrameQueue.
SCOMDataLinkDesc* SCOM_Create | ( | void | ) |
Creates an instance of SCOM descriptor.
Definition at line 146 of file scom.c.
Referenced by SCOM_ScanAndRun().
SCOMFrameBuffer* SCOM_CreateFrameBuffer | ( | size_t | rxBuffSize, |
size_t | txBuffSize | ||
) |
Allocates memory (using heap), creates and initializes a frame buffer for SCOM, of a given size. This frame buffer can than be used in a call to SCOM_Init. Alternatively, if heap memory allocation is discouraged, macro SCOM_DECLARE_FRAME_BUFFER can be used to declare the frame buffer statically.
rxBuffSize | number of incoming frames that can fit into the frame buffer |
txBuffSize | number of outgoing frames that can fit into the frame buffer |
Definition of a SCOM frame queue.
Frame pool items
First item in the queue
Pool size (number of managed items)
Pool access mutex
Definition at line 174 of file scom.c.
References SCOMFrameQueue::pool, SCOMFrameBuffer::rxFrameQueue, and SCOMFrameBuffer::txFrameQueue.
Referenced by SCOM_ScanAndRun().
SCOMResult SCOM_Deinit | ( | SCOMDataLinkDesc *const | scom | ) |
Definition at line 343 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::connectionState, SCOMDataLinkDesc::frameBuffer, SCOMFrameBuffer::rxFrameQueue, SCOM_CONNECTION_UNINITIALIZED, SCOM_RESULT_ERROR, SCOM_RESULT_OK, SCOMFrameQueue_Deinit(), and SCOMFrameBuffer::txFrameQueue.
Referenced by SCOM_ScanAndRun().
void SCOM_Destroy | ( | SCOMDataLinkDesc *const | scom | ) |
Destroys an instance of SCOM descriptor.
scom | SCOM descriptor |
Definition at line 161 of file scom.c.
Referenced by SCOM_ScanAndRun().
void SCOM_DestroyFrameBuffer | ( | SCOMFrameBuffer * | frameBuffer | ) |
Destroys the frame buffer, previously created with a call to SCOM_CreateFrameBuffer.
frameBuffer | frame buffer to destroy |
SCOMResult SCOM_DisableConnectivityCheck | ( | SCOMDataLinkDesc *const | scom | ) |
Definition at line 450 of file scom.c.
References SCOMDataLinkDesc::connectivityCheckPeriod, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
SCOMResult SCOM_EnableConnectivityCheck | ( | SCOMDataLinkDesc *const | scom, |
const uint32_t | checkPeriod | ||
) |
Definition at line 437 of file scom.c.
References SCOMDataLinkDesc::connectivityCheckPeriod, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
SCOMConnectionState SCOM_GetConnectionState | ( | const SCOMDataLinkDesc *const | scom | ) |
Checks SCOM connection state.
scom | SCOM descriptor |
SCOM_CONNECTION_UNINITIALIZED | SCOM connection is not initialized |
SCOM_CONNECTION_OPERATIONAL | connection is operational |
SCOM_CONNECTION_UNSYNCHRONIZED | connection lost synchronization |
SCOM_CONNECTION_BROKEN | connection was broken |
Definition at line 461 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::connectionState, SCOM_ACCESS_GUARD_TIMEOUT, SCOM_CONNECTION_UNINITIALIZED, and SCOM_RESULT_ERROR.
IODevice SCOM_GetIODevice | ( | const SCOMDataLinkDesc *const | scom | ) |
Gets the IODevice associated with SCOM.
scom | SCOM descriptor |
Definition at line 482 of file scom.c.
References SCOMDataLinkDesc::iodevice.
SCOMFrame* SCOM_GetReceivedFrame | ( | SCOMDataLink | scom | ) |
Gets the oldest received frame that is waiting in the reception queue. The caller is responsible for deleting the frame once it is not needed anymore, through a call to SCOM_UnlockFrame.
scom | SCOM handle |
Definition at line 1065 of file scom.c.
References SCOMFrameQueueItem::frame, SCOMDataLinkDesc::frameBuffer, SCOMFrameBuffer::rxFrameQueue, and SCOMFrameQueue_GetFirstInQueue().
Referenced by SCOM_FilterProc().
SCOMStatistics SCOM_GetStatistics | ( | const SCOMDataLinkDesc *const | scom | ) |
Gets current SCOM statistics record.
scom | SCOM handle |
Definition at line 1109 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOM_ACCESS_GUARD_TIMEOUT, and SCOMDataLinkDesc::stats.
SCOMResult SCOM_Init | ( | SCOMDataLink | scom, |
IODevice | iodevice, | ||
SCOMFrameBuffer * | frameBuffer, | ||
SCOMClockSource | clockSource, | ||
uint32_t | ackTimeout, | ||
uint32_t | deviceClass, | ||
uint8_t * | deviceUID, | ||
uint8_t | numberOfServices, | ||
uint8_t * | serviceIDs | ||
) |
Initializes the SCOM protocol on top of the provided IODevice object.
scom | SCOM descriptor |
iodevice | IODevice object used as a hardware interface for SCOM |
frameBuffer | pointer to a frame buffer structure (see SCOM_DECLARE_FRAME_BUFFER) |
clockSource | function returning current time |
ackTimeout | time used for detecting timeout in ACK reception |
deviceClass | class of the SCOM device |
deviceUID | unique identifier of the SCOM device |
numberOfServices | number of standard services that will be supported by the protocol - must be less or equal to SCOM_MAX_SERVICES |
serviceIDs | array of service identifiers (size equals to numberOfServices) |
Definition at line 230 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::clockSource, SCOMDataLinkDesc::connectionState, SCOMDataLinkDesc::connectivityCheckIncommingCounter, SCOMDataLinkDesc::connectivityCheckOutgoingCounter, SCOMDataLinkDesc::connectivityCheckPeriod, HAL_PACKED::deviceClass, HAL_PACKED::deviceUID, SCOMACKState::frame, SCOMDataLinkDesc::frameBeingTransmitted, SCOMDataLinkDesc::frameBuffer, SCOMStatistics::framesReceived, SCOMStatistics::framesSent, SCOMDataLinkDesc::id, SCOMDataLinkDesc::iodevice, SCOMDataLinkDesc::lastConnectivityCheckTime, SCOMDataLinkDesc::lastFrameNumber, SCOMDataLinkDesc::multiCounter, SCOMStatistics::retransmissionsReceived, SCOMStatistics::retransmissionsSent, HAL_PACKED::revision, SCOMDataLinkDesc::rxAck, SCOMFrameBuffer::rxFrameQueue, SCOMDataLinkDesc::rxState, SCOM_ACK_SOF_CHARACTER, SCOM_CONNECTION_OPERATIONAL, SCOM_ERROR, SCOM_MAX_FRAME_FILTERS, SCOM_MAX_SERVICES, SCOM_RESULT_OK, SCOM_REVISION, SCOM_RX_WAIT_FOR_SOF, SCOM_VER_HI, SCOM_VER_LO, SCOMFrameQueue_Init(), SCOMDataLinkDesc::serviceCount, HAL_PACKED::soack, SCOMDataLinkDesc::stats, HAL_PACKED::sync, SCOMDataLinkDesc::timeout, SCOMDataLinkDesc::txCounter, SCOMFrameBuffer::txFrameQueue, HAL_PACKED::verHi, HAL_PACKED::verLo, and HAL_PACKED::version.
Referenced by SCOM_InitAsMonitor(), and SCOM_ScanAndRun().
SCOMResult SCOM_InitAsMonitor | ( | SCOMDataLink | scom, |
IODevice | iodevice, | ||
SCOMFrameBuffer * | frameBuffer, | ||
SCOMClockSource | clockSource, | ||
uint32_t | ackTimeout | ||
) |
Initializes the SCOM protocol on top of the provided IODevice object but as a protocol monitor only.
scom | SCOM descriptor |
iodevice | IODevice object used as a hardware interface for SCOM |
frameBuffer | pointer to a frame buffer structure (see SCOM_DECLARE_FRAME_BUFFER) |
clockSource | function returning current time |
ackTimeout | time used for detecting timeout in ACK reception |
Definition at line 363 of file scom.c.
References SCOMDataLinkDesc::monitorMode, SCOM_Init(), and SCOM_RESULT_OK.
bool SCOM_IsBusy | ( | SCOMDataLink | scom | ) |
Checks if SCOM is in the middle of some sending or receiving process.
scom | SCOM handle |
Definition at line 1044 of file scom.c.
References SCOMDataLinkDesc::frameBeingTransmitted, SCOMDataLinkDesc::frameBuffer, SCOM_FRAME_EMPTY, SCOM_FRAME_TX_SENT, SCOMFrameQueue_GetFirstInQueue(), SCOMFrameQueueItem::state, and SCOMFrameBuffer::txFrameQueue.
SCOMResult SCOM_Proc | ( | SCOMDataLink | scom | ) |
Implements the SCOM data link layer procedures. Must be called periodically (for ex. in an OS task).
scom | SCOM handle |
SCOM_RESULT_OK | on success |
SCOM_COMMUNICATION_ERROR | if a communication error was detected |
SCOM_SYNCHRONIZATION_ERROR | if link was desynchronized |
SCOM_ERROR | if other error occurred |
Definition at line 859 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::clockSource, SCOMDataLinkDesc::connectionState, HAL_PACKED::crc, SCOMFrameQueueItem::frame, SCOMACKState::frame, SCOMDataLinkDesc::frameBeingReceived, SCOMDataLinkDesc::frameBeingTransmitted, SCOMDataLinkDesc::frameBuffer, SCOMStatistics::framesReceived, SCOMStatistics::framesSent, SCOMDataLinkDesc::iodevice, SCOMDataLinkDesc::lastConnectivityCheckTime, SCOMDataLinkDesc::receptionTime, SCOMStatistics::retransmissionsReceived, SCOMStatistics::retransmissionsSent, SCOMDataLinkDesc::rxAck, SCOMDataLinkDesc::rxState, SCOM_ACCESS_GUARD_TIMEOUT, SCOM_ACK_SOF_CHARACTER, SCOM_COMMUNICATION_ERROR, SCOM_CONNECTION_BROKEN, SCOM_CONNECTION_OPERATIONAL, SCOM_CONNECTION_UNSYNCHRONIZED, SCOM_ERROR, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_RX_ACK, SCOM_RX_FRAME, SCOM_RX_WAIT_FOR_SOF, SCOM_SOF_CHARACTER, SCOM_SYNCHRONIZATION_ERROR, SCOMAckFrame_CalculateCRC(), SCOMAckFrame_Initialize(), SCOMAckFrame_IsValidAck(), SCOMFrame_IsAcknowledged(), SCOMFrame_SetFrameNumber(), SCOMFrameQueue_GetFirstInQueue(), SCOMFrameQueue_Unlock(), SCOMDataLinkDesc::sendTime, SCOMFrameQueueItem::state, SCOMACKState::state, SCOMDataLinkDesc::stats, SCOMDataLinkDesc::timeout, SCOMDataLinkDesc::txAck, SCOMFrameBuffer::txFrameQueue, and HAL_PACKED::type.
void SCOM_ResetStatistics | ( | SCOMDataLinkDesc *const | scom | ) |
Definition at line 1131 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOM_ACCESS_GUARD_TIMEOUT, and SCOMDataLinkDesc::stats.
SCOMResult SCOM_RunProcessingThread | ( | SCOMDataLinkDesc *const | scom | ) |
Definition at line 403 of file scom.c.
References SCOMDataLinkDesc::procTask, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
Referenced by SCOM_ScanAndRun().
SCOMResult SCOM_SendAllocatedFrame | ( | SCOMDataLink | scom, |
SCOMFrame * | frame | ||
) |
Schedules transmission of a frame, that was previously allocated with SCOM_AllocFrame. The frame should have already these properties set: type, priority, dataSize. After being sent, the frame is automatically deleted (unlocked) - there is no need to explicitly call SCOM_UnlockFrame.
scom | SCOM handle |
frame | frame previously allocated with SCOM_AllocFrame |
SCOM_RESULT_OK | if the frame transmission was scheduled successfully |
SCOM_FRAME_NOT_IN_BUFFER | if the frame is not part of the SCOM frame buffer |
SCOM_ERROR | if other error occurred |
Definition at line 735 of file scom.c.
References SCOMDataLinkDesc::frameBuffer, HAL_PACKED::null, SCOM_ERROR, SCOM_FRAME_NOT_IN_BUFFER, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOMFrameQueue_GetItemByFrame(), SCOMFrameQueue_Insert(), HAL_PACKED::sof, SCOMFrameQueueItem::state, and SCOMFrameBuffer::txFrameQueue.
SCOMResult SCOM_SendAllocatedFrameWithoutACK | ( | SCOMDataLink | scom, |
SCOMFrame * | frame | ||
) |
Schedules transmission of a frame, that was previously allocated with SCOM_AllocFrame. The frame should have already these properties set: type, priority, dataSize. After being sent, the frame is automatically deleted (unlocked) - there is no need to explicitly call SCOM_UnlockFrame.
scom | SCOM handle |
frame | frame previously allocated with SCOM_AllocFrame |
SCOM_RESULT_OK | if the frame transmission was scheduled successfully |
SCOM_FRAME_NOT_IN_BUFFER | if the frame is not part of the SCOM frame buffer |
SCOM_ERROR | if other error occurred |
Definition at line 766 of file scom.c.
References SCOMDataLinkDesc::frameBuffer, HAL_PACKED::null, SCOM_ERROR, SCOM_FRAME_NOT_IN_BUFFER, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOMFrame_SetAcknowledgement(), SCOMFrameQueue_GetItemByFrame(), SCOMFrameQueue_Insert(), HAL_PACKED::sof, SCOMFrameQueueItem::state, and SCOMFrameBuffer::txFrameQueue.
SCOMResult SCOM_SendAllocatedMultiFrame | ( | SCOMDataLink | scom, |
SCOMFrame * | frame, | ||
SCOMMultiFrameDesc * | multiFrameDesc | ||
) |
Schedules transmission of a mulitframe, that was previously allocated with SCOM_AllocFrame. The frame should have already these properties set: type, priority, dataSize. After being sent, the frame is automatically deleted (unlocked) - there is no need to explicitly call SCOM_UnlockFrame.
scom | SCOM handle |
frame | frame previously allocated with SCOM_AllocFrame |
multiFrameDesc | pointer to a multiframe descriptor, that holds information about a multiframe sending process |
SCOM_RESULT_OK | if the frame transmission was scheduled successfully |
SCOM_FRAME_NOT_IN_BUFFER | if the frame is not part of the SCOM frame buffer |
SCOM_ERROR | if other error occurred |
Definition at line 650 of file scom.c.
References HAL_PACKED::ctrl, SCOMDataLinkDesc::frameBuffer, SCOMMultiFrameDesc::multi_id, SCOMDataLinkDesc::multiCounter, HAL_PACKED::multiframe, HAL_PACKED::null, HAL_PACKED::payload, SCOMMultiFrameDesc::progress, SCOM_ERROR, SCOM_FRAME_CTRL_MULTI_ID_MASK, SCOM_FRAME_NOT_IN_BUFFER, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOMFrameQueue_GetItemByFrame(), SCOMFrameQueue_Insert(), HAL_PACKED::size, HAL_PACKED::sof, SCOMFrameQueueItem::state, and SCOMFrameBuffer::txFrameQueue.
SCOMResult SCOM_SendFrame | ( | SCOMDataLinkDesc *const | scom, |
uint8_t | framePriority, | ||
uint8_t | frameType, | ||
const void * | frameData, | ||
uint8_t | frameDataSize | ||
) |
Definition at line 493 of file scom.c.
References HAL_PACKED::ctrl, SCOMFrameQueueItem::frame, SCOMDataLinkDesc::frameBuffer, HAL_PACKED::null, HAL_PACKED::payload, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_ERROR, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOM_TX_FRAME_BUFFER_OVERRUN, SCOMFrame_SetPriority(), SCOMFrameQueue_Insert(), SCOMFrameQueue_Lock(), HAL_PACKED::singleframe, HAL_PACKED::size, HAL_PACKED::sof, SCOMFrameQueueItem::state, SCOMFrameBuffer::txFrameQueue, and HAL_PACKED::type.
Referenced by SCOM_GetIdentity(), and SCOM_Transaction().
SCOMResult SCOM_SendFrameWithoutAck | ( | SCOMDataLink | scom, |
uint8_t | framePriority, | ||
uint8_t | frameType, | ||
const void * | frameData, | ||
uint8_t | frameDataSize | ||
) |
WARNING: THIS FUNCTION SENDS THE FRAME WITHOUT ACKNOWLEDGEMENT. NO RETRANSMISSION WILL BE HANDLED.
Schedules the frame transmission. The frame is copied (along with all the data) to the internal SCOM buffer. If there is no activity on the hardware interface then the frame will be sent at the next call to SCOM_Proc. However if there are other frames (older or with higher priority) the frame will wait for it's turn. This function may be called asynchronously with other SCOM functions and from ISRs.
scom | SCOM handle |
framePriority | priority of a frame |
frameType | type of frame |
frameData | data associated with the frame or NULL if there is no data |
frameDataSize | size of data to be associated with frame |
Definition at line 530 of file scom.c.
References HAL_PACKED::ctrl, SCOMFrameQueueItem::frame, SCOMDataLinkDesc::frameBuffer, HAL_PACKED::null, HAL_PACKED::payload, SCOM_ERROR, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOM_TX_FRAME_BUFFER_OVERRUN, SCOMFrame_SetAcknowledgement(), SCOMFrame_SetPriority(), SCOMFrameQueue_Insert(), SCOMFrameQueue_Lock(), HAL_PACKED::singleframe, HAL_PACKED::size, HAL_PACKED::sof, SCOMFrameQueueItem::state, SCOMFrameBuffer::txFrameQueue, and HAL_PACKED::type.
Referenced by SCOM_WaitForDevice().
SCOMResult SCOM_SendMultiFrame | ( | SCOMDataLink | scom, |
uint8_t | framePriority, | ||
uint8_t | frameType, | ||
const void * | frameData, | ||
uint32_t | frameDataSize, | ||
SCOMMultiFrameDesc * | multiFrameDesc | ||
) |
Schedules sending of another part of multi-frame packet. The resulting frame is copied (along with all the data) to the internal SCOM buffer, just like in the case of a standard SCOM frame.
scom | SCOM handle |
framePriority | priority of a frame |
frameType | type of frame |
frameData | data associated with the frame or NULL if there is no data |
frameDataSize | total size of data to send in multi-frame packet |
multiFrameDesc | pointer to a SCOMMultiFrameDesc structure where the information about multi-frame sending progress will be stored - used to enable iterative sending of multi-frames. |
Definition at line 574 of file scom.c.
References HAL_PACKED::ctrl, SCOMFrameQueueItem::frame, SCOMDataLinkDesc::frameBuffer, SCOMMultiFrameDesc::multi_id, SCOMDataLinkDesc::multiCounter, HAL_PACKED::multiframe, HAL_PACKED::null, HAL_PACKED::payload, SCOMMultiFrameDesc::progress, SCOM_ERROR, SCOM_FRAME_CTRL_MULTI_ID_MASK, SCOM_FRAME_TX_READY_FOR_SEND, SCOM_RESULT_OK, SCOM_SOF_CHARACTER, SCOM_TX_FRAME_BUFFER_OVERRUN, SCOMFrame_SetPriority(), SCOMFrameQueue_Insert(), SCOMFrameQueue_Lock(), HAL_PACKED::size, HAL_PACKED::sof, SCOMFrameQueueItem::state, SCOMFrameBuffer::txFrameQueue, and HAL_PACKED::type.
SCOMResult SCOM_SetAckReceptionHandlerFunc | ( | SCOMDataLinkDesc *const | scom, |
SCOMAckReceptionHandler | ackReceptionFunc | ||
) |
Definition at line 822 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::ackHandler, SCOM_ACCESS_GUARD_TIMEOUT, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
SCOMResult SCOM_SetFrameReceptionHandlerFunc | ( | SCOMDataLinkDesc *const | scom, |
SCOMFrameReceptionHandler | frameReceptionFunc | ||
) |
Definition at line 802 of file scom.c.
References SCOMDataLinkDesc::accessGuard, SCOMDataLinkDesc::receptionHandler, SCOM_ACCESS_GUARD_TIMEOUT, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
Referenced by SCOM_InitFiltering().
SCOMResult SCOM_SetServiceHandler | ( | SCOMDataLink | scom, |
uint8_t | serviceID, | ||
SCOMServiceHandler | serviceHandlerFunc | ||
) |
Sets the service frame reception handler. This handler is a function that will be called by the SCOM each time a service frame with the matching serviceID is received. Note however, that all the serviceIDs that should be handled need to be defined during the call to SCOM_Init .
scom | SCOM handle |
serviceID | serviceID |
serviceHandlerFunc | pointer to the handler function |
Definition at line 841 of file scom.c.
References SCOM_MAX_SERVICES, SCOM_RESULT_ERROR, and SCOM_RESULT_OK.
void SCOM_StopProcessingThread | ( | SCOMDataLink | scom | ) |
Starts the thread, previously started with SCOM_RunProcessingThread.
scom | SCOM descriptor |
Definition at line 420 of file scom.c.
References SCOMDataLinkDesc::procTask.
Referenced by SCOM_ScanAndRun().
void SCOM_UnlockFrame | ( | SCOMDataLink | scom, |
SCOMFrame * | frame | ||
) |
Deletes the frame that was either received through a call to SCOM_GetReceivedFrame or was allocated using SCOM_AllocFrame, but was not sent using SCOM_SendAllocatedFrame.
scom | SCOM handle |
frame | frame to delete |
Definition at line 1086 of file scom.c.
References SCOMDataLinkDesc::frameBuffer, SCOMFrameBuffer::rxFrameQueue, SCOMFrameQueue_GetItemByFrame(), SCOMFrameQueue_Unlock(), and SCOMFrameBuffer::txFrameQueue.
Referenced by SCOM_FilterProc().