/************************************************************************** * * Copyright (c) 2024-2024 Diality Inc. - All Rights Reserved. * * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * @file SystemCommDD.h * * @author (last) Vinayakam Mani * @date (last) 06-Aug-2024 * * @author (original) Vinayakam Mani * @date (original) 05-Aug-2024 * ***************************************************************************/ #ifndef __SYSTEM_COMM_DD_H__ #define __SYSTEM_COMM_DD_H__ #include "DDCommon.h" #include "CommBuffers.h" #include "MsgQueues.h" #include "SystemComm.h" /** * @defgroup SystemCommDD SystemCommDD * @brief System communication unit. Manages incoming and outgoing CAN frames. * * @addtogroup SystemCommDD * @{ */ // ********** public definitions ********** #define MAX_MSG_SEQ_NO 0x7FFF ///< Maximum sequence number for Denali message (then wraps to 1). #define MIN_MSG_SEQ_NO 0x0001 ///< Minimum sequence number for Denali message. #define NUM_OF_CAN_OUT_BUFFERS 5 ///< Number of CAN buffers for transmit #define NUM_OF_CAN_IN_BUFFERS 9 ///< Number of CAN buffers for receiving // ********** public function prototypes ********** void initSystemCommDD( void ); void processReceivedMessage( MESSAGE_T *message ); COMM_BUFFER_T getInBufferID( U32 idx ); COMM_BUFFER_T getOutBufferID( U32 idx ); BOOL isTDCommunicating( void ); BOOL isOnlyCANNode( void ); void setOnlyCANNode( BOOL only ); void clearCANXmitBuffers( void ); void checkForCommTimeouts( void ); void checkTooManyBadMsgCRCs( void ); BOOL testTDCommunicationStatus( MESSAGE_T *message ); /**@}*/ #endif