summaryrefslogtreecommitdiffstats
path: root/communication/server/include/CAN
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:28:36 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-10-22 13:28:36 +0900
commit211696c95c1ec3fc48e0096d47d4278910274195 (patch)
treef3e0a5461f83a0ec191b788070fe59639148fb17 /communication/server/include/CAN
parentaacd1728939f2b6f4c811cd93502966265cd8203 (diff)
ps-communication branch 0.1sandbox/ToshikazuOhiwa/ps-communication
Diffstat (limited to 'communication/server/include/CAN')
-rw-r--r--communication/server/include/CAN/CommWatch/CAN_CommWatch.h45
-rw-r--r--communication/server/include/CAN/CommWatch/CAN_CommWatchData.h125
-rw-r--r--communication/server/include/CAN/CommWatch/CommWatchCommon.h22
-rw-r--r--communication/server/include/CAN/Command/CAN_Command.h23
-rw-r--r--communication/server/include/CAN/Command/CAN_CommandData.h96
-rw-r--r--communication/server/include/CAN/Delivery/CAN_Delivery.h46
-rw-r--r--communication/server/include/CAN/Delivery/CAN_DeliveryData.h7
-rw-r--r--communication/server/include/CAN/TimerCtrl/CAN_TimerCtrl.h82
-rw-r--r--communication/server/include/CAN/Transmission/CAN_Transmission.h56
-rw-r--r--communication/server/include/CAN/Transmission/CAN_TransmissionData.h162
-rw-r--r--communication/server/include/CAN/TxMsg/CAN_TxMsg.h128
11 files changed, 96 insertions, 696 deletions
diff --git a/communication/server/include/CAN/CommWatch/CAN_CommWatch.h b/communication/server/include/CAN/CommWatch/CAN_CommWatch.h
index 3b6c8840..16aa54ff 100644
--- a/communication/server/include/CAN/CommWatch/CAN_CommWatch.h
+++ b/communication/server/include/CAN/CommWatch/CAN_CommWatch.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,34 +16,27 @@
#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_
#define COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_
-/******************************************************************************
- * FILE :CAN_CommWatch.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-#include "CAN_CommWatchData.h"
+#include <native_service/frameworkunified_types.h>
+#include <peripheral_service/Canif_API.h>
+#include <vector>
+#include <map>
+#include <string>
+#include "CommWatchCommon.h"
-/************************************************************************
-* Macro definitions *
-************************************************************************/
+typedef struct {
+ char notify_name[MAX_NAME_SIZE_APP];
+ uint32_t data_id;
+ uint8_t comm_watch_flag;
+ uint16_t set_time;
+ uint16_t timer_cnt;
+} CAN_COMM_WATCH_VAL;
-/* Flag relationship */
-#define CAN_COMM_IG_OFF 0x00 /* IG OFF */
-#define CAN_COMM_IG_ON 0x01 /* IG ON */
-#define CAN_COMM_IG_NORCV 0xFF /* IG not yet */
+typedef std::multimap<CANID, CAN_COMM_WATCH_VAL> CAN_CommWatchTable;
+typedef std::pair<const CANID, CAN_COMM_WATCH_VAL> CAN_CommWatchTablePair;
+typedef CAN_CommWatchTable::iterator CAN_CommWatchTableIt;
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
void CANCommWatchInit(void);
-RET_CAN CANCommWatchTimeoutMsg(HANDLE h_app, uint16_t);
EFrameworkunifiedStatus CANCommWatch(HANDLE h_app);
-EFrameworkunifiedStatus CANCommWatchCore(HANDLE h_app, CAN_PROTOCOL_TYPE type);
-void CANCommWatchClear(HANDLE h_app, CANID);
-EFrameworkunifiedStatus CANVehicleInfoMsg(HANDLE h_app);
-uint8_t CANIgStatGet(void);
+EFrameworkunifiedStatus CANCommWatchTimeout(HANDLE h_app);
+void CANCommWatchClear(HANDLE h_app, CANID id);
#endif // COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCH_H_
diff --git a/communication/server/include/CAN/CommWatch/CAN_CommWatchData.h b/communication/server/include/CAN/CommWatch/CAN_CommWatchData.h
deleted file mode 100644
index 7a982e03..00000000
--- a/communication/server/include/CAN/CommWatch/CAN_CommWatchData.h
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCHDATA_H_
-#define COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCHDATA_H_
-/******************************************************************************
- * FILE :CAN_CommWatchData.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
-#include <peripheral_service/Canif_API.h>
-#include "CAN_Thread.h"
-
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-/* #001 start */
-#define COMM_WATICH_TIMER_SEQ_NO_MIN 0x0001 /* Minimum value of timer sequence number */
-/* #100 start */
-#define COMM_WATICH_TIMER_SEQ_NO_MAX 0x0FFF /* Maximum value of timer sequence number */
-/* #001 end */
-/* #100 end */
-
-/* Flag Relationship */
-#define CAN_COMM_OFF 0x00 /* Monitoring OFF */
-#define CAN_COMM_NORMAL 0x01 /* Communicating */
-#define CAN_COMM_STOP 0x02 /* Interruption of communication */
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-/***************************************************
-* TAG : CAN_COMM_WATCH_DAT
-* ABSTRACT : Communication interruption monitoring management table structure (1 item)
-* Use in arrays when used
-* (CAN internal data management table) Not used because API is used in the TBD_Z first game
-****************************************************/
-typedef struct { /* Type definition of communication disconnection monitoring management table (1 case) */
- CANID ul_can_id; /* CAN ID */
- DID ul_did; /* Data ID */
- uint16_t us_watch_time; /* Communication interruption monitoring time (in units of 100ms) */
- // uint32_t notifyId; /* Addresses for delivery ID */
- uint8_t uc_comm_stop; /* Communication status */
- uint8_t uc_ig; /* IG linkage */
- uint16_t us_timer_seq_no; /* Timer Sequence Number*/
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN_COMM_WATCH_DAT;
-
-/************************************************************************
-* Variable prototype *
-************************************************************************/
-/* Communication disruption monitoring management table */
-extern CAN_COMM_WATCH_DAT g_st_comm_watch_dat[CAN_PROTOCOL_TYPE_TERMINATE][COMM_WATCH_LIST_NUM];
-/* Number of effective registrations of communication disruption monitoring management table */
-extern uint16_t g_us_comm_watch_dat_cnt[CAN_PROTOCOL_TYPE_TERMINATE];
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
-void CANCommWatchDataInit(void);
-BOOL CANCommWatchCanidDidEntryCheck(uint8_t, CANID canid, DID did, CAN_PROTOCOL_TYPE);
-BOOL CANCommWatchTimerSeqNoEntryCheck(uint16_t, uint8_t *, uint8_t *, CAN_PROTOCOL_TYPE);
-BOOL CANCommWatchEntryCheck(CANID canid, DID did, PCSTR namel, uint8_t *, CAN_PROTOCOL_TYPE);
-void CANCommWatchEntry(uint8_t uc_index, const CAN_COMM_WATCHEXT_MSG_DAT *pst_msg_data,
- uint16_t us_timer_seq_no, uint8_t uc_comm_stop, CAN_PROTOCOL_TYPE);
-void CANCommWatchDelete(uint8_t, CAN_PROTOCOL_TYPE);
-void CANCommWatchCtrl(uint8_t, uint8_t, CAN_PROTOCOL_TYPE);
-void CANCommWatchDataGet(uint8_t, char *, DID *, uint8_t *, CAN_PROTOCOL_TYPE);
-uint16_t CANCommWatchTimerSeqNoGet(uint8_t, CAN_PROTOCOL_TYPE);
-uint16_t CANCommWatchTimerSeqNoRenwal(uint8_t, uint16_t *, CAN_PROTOCOL_TYPE);
-BOOL CANCommWatchSndCheck(uint8_t, PCSTR name, CAN_PROTOCOL_TYPE);
-uint8_t CANCommWatchIgcoopGet(uint8_t uc_index, CAN_PROTOCOL_TYPE);
-void CANCommWatchBufferOut(FILE *fp_log, CAN_PROTOCOL_TYPE);
-inline BOOL CANCommWatchCanidEntryCheck(uint8_t uc_index, CANID ul_can_id, uint8_t *puc_comm_stop,
- uint16_t *pus_chk_cnt, CAN_PROTOCOL_TYPE);
-
-/* for debug */
-EFrameworkunifiedStatus CANCommWatchAllClearDebug(HANDLE h_app);
-/*******************************************************************************
- * MODULE : CANCommWatchCanidEntryCheck
- * ABSTRACT : CANDataCommunication Disruption Monitoring Control Table Registration Status Checking Process (CAN ID Search)
- * FUNCTION : Compare the communication discontinuity monitoring control data indicated by the index with the specified CAN ID.
- * ARGUMENT : uc_index :Indexed
- * can_id :CAN ID
- * puc_comm_stop :Communication status return pointer
- * pusChkCnt :Pointer to number of valid data checks for table registration
- * NOTE :
- * RETURN : TRUE :Data consistency
- * FALSE :Data mismatch
- ******************************************************************************/
-
-inline BOOL CANCommWatchCanidEntryCheck(uint8_t uc_index, CANID can_id, uint8_t *puc_comm_stop,
- uint16_t *pusChkCnt, CAN_PROTOCOL_TYPE mode) {
- BOOL ret = FALSE;
- CAN_COMM_WATCH_DAT *ptr = &g_st_comm_watch_dat[mode][uc_index];
-
- /* Is the specified index monitoring interrupted? */
- if ((uint16_t)0 != ptr->us_watch_time) {
- /* Specified index-data CANID matches the arguments? */
- if (can_id == ptr->ul_can_id) {
- ret = TRUE;
- *puc_comm_stop = ptr->uc_comm_stop;
- }
- /* Updating the number of effective data checks for table registration */
- *pusChkCnt = (uint16_t)(*pusChkCnt + (uint16_t)1);
- }
-
- return (ret);
-}
-
-#endif // COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_CAN_COMMWATCHDATA_H_
diff --git a/communication/server/include/CAN/CommWatch/CommWatchCommon.h b/communication/server/include/CAN/CommWatch/CommWatchCommon.h
new file mode 100644
index 00000000..7306214e
--- /dev/null
+++ b/communication/server/include/CAN/CommWatch/CommWatchCommon.h
@@ -0,0 +1,22 @@
+/*
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_COMMWATCH_COMMON_H_
+#define COMMUNICATION_SERVER_INCLUDE_CAN_COMMWATCH_COMMWATCH_COMMON_H_
+#define CAN_COMM_OFF 0x00
+#define CAN_COMM_NORMAL 0x01
+#define CAN_COMM_STOP 0x02
+#endif
diff --git a/communication/server/include/CAN/Command/CAN_Command.h b/communication/server/include/CAN/Command/CAN_Command.h
index ca385b2d..43abcdcd 100644
--- a/communication/server/include/CAN/Command/CAN_Command.h
+++ b/communication/server/include/CAN/Command/CAN_Command.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,27 +16,6 @@
#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMAND_H_
#define COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMAND_H_
-/******************************************************************************
- * FILE :CAN_Command.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
-#include "CAN_Thread.h"
-
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
EFrameworkunifiedStatus CANCommandTransmission(HANDLE h_app);
RET_CAN CANCommandTxRslt(HANDLE h_app, CAN_MSG_DATA*);
-RET_CAN CANCommandDelivery(HANDLE h_app, CAN_MSG_DATA*);
-
#endif // COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMAND_H_
diff --git a/communication/server/include/CAN/Command/CAN_CommandData.h b/communication/server/include/CAN/Command/CAN_CommandData.h
deleted file mode 100644
index 3d476a68..00000000
--- a/communication/server/include/CAN/Command/CAN_CommandData.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMANDDATA_H_
-#define COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMANDDATA_H_
-/******************************************************************************
- * FILE :CAN_CommandData.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
-#include <native_service/frameworkunified_types.h>
-
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-/* Number of table elements */
-#define CAN_COMMAND_DELIVERY_SNDID_NUM 16 /* CAN Command Delivery Registered Delivery Destination ID Max. */
-#define CAN_COMMAND_DELIVERY_NUM 6 /* Max. number of CAN command delivery control tables (6 for CAN command) */
-#define CAN_COMMAND_TXRSLT_SNDID_NUM 16 /* Maximum number of registered delivery destination IDs for CAN command transmission results */
-#define CAN_COMMAND_TXRSLT_NUM (6 * CAN_COMMAND_TXRSLT_SNDID_NUM) /* Maximum number of CAN command transmission result management tables */
-
-/* Control method */
-#define CAN_CMD_DELIVERY_CTRL 0 /* Delivery control type */
-#define CAN_CMD_1TIME_TRANCE 1 /* One-time communication */
-#define CAN_CMD_TRANCE 2 /* Continuous communication type */
-
-/* Controlling flag */
-#define CAN_CMD_RST_NOT_RCV 0 /* Not received */
-#define CAN_CMD_RST_RCV 1 /* Received */
-
-/* Resource ID Mask */
-#define CAN_CMD_RID_MASK 0x80
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-/***************************************************
-* TAG : CAN_COMMAND_DELIVERY_LIST_DAT
-* ABSTRACT : CAN command delivery management table structure (1 item)
-* Use in arrays when used
-* (CAN internal data management table)
-****************************************************/
-typedef struct {
- uint8_t uc_ctrl; /* Control method */
- uint8_t uc_flag; /* Controlling flag */
- uint8_t notify_name_num; /* Number of registered shipping destinations */
- uint8_t reserve; /* ----- */
- // uint32_t notifyIdList[CAN_COMMAND_DELIVERY_SNDID_NUM]; /* Addresses for delivery ID */
- char notify_name_list[CAN_COMMAND_DELIVERY_SNDID_NUM][MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN_COMMAND_DELIVERY_LIST_DAT;
-
-/***************************************************
-* TAG : CAN_COMMAND_TXRSLT_LIST_DAT
-* ABSTRACT : CAN command transmission result management table structure (1 item)
-* Use in arrays when used
-* (CAN internal data management table)
-****************************************************/
-typedef struct {
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
- // uint32_t notifyId; /* Addresses for delivery ID */
- uint8_t uc_rid; /* Resources ID */
- uint8_t uc_cmd_id; /* CAN command ID */
-} CAN_COMMAND_TXRSLT_LIST_DAT;
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
-BOOL CANCommandDeliveryEntryCheck(PCSTR name, uint8_t);
-void CANCommandDeliveryEntry(PCSTR name, uint8_t);
-void CANCommandDeliveryDataGet(uint8_t, CAN_COMMAND_DELIVERY_LIST_DAT *);
-void CANCommandDeliveryDelete(uint8_t);
-void CANCommandDeliveryDeletesingle(uint8_t, PCSTR);
-BOOL CANCommandTxRsltEntryCheck(uint8_t, uint8_t *);
-void CANCommandTxRsltEntry(uint8_t, PCSTR name, uint8_t);
-void CANCommandTxRsltDataGet(uint8_t, char *, uint8_t *, uint8_t *);
-void CANCommandTxRsltDelete(uint8_t);
-BOOL CANCommandTxRsltCheck(uint8_t);
-BOOL CANCommandFuelCalcRstReqCheck(void);
-void CANCommandFuelCalcRstReq(void);
-void CANCommandDataInit(void);
-
-#endif // COMMUNICATION_SERVER_INCLUDE_CAN_COMMAND_CAN_COMMANDDATA_H_
diff --git a/communication/server/include/CAN/Delivery/CAN_Delivery.h b/communication/server/include/CAN/Delivery/CAN_Delivery.h
index 74e226c1..01f2e2ff 100644
--- a/communication/server/include/CAN/Delivery/CAN_Delivery.h
+++ b/communication/server/include/CAN/Delivery/CAN_Delivery.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,33 +16,25 @@
#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_DELIVERY_CAN_DELIVERY_H_
#define COMMUNICATION_SERVER_INCLUDE_CAN_DELIVERY_CAN_DELIVERY_H_
-/******************************************************************************
- * FILE :CAN_Delivery.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
-#include <peripheral_service/Canif_API.h>
+#include <native_service/frameworkunified_types.h>
#include "CAN_Thread.h"
+#include <vector>
+#include <map>
+#include <string>
+#include <can_hal.h>
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-#define CAN_CSUM_CHECKTBL_STOP_CODE 0xFFFFFFFFUL
-/* CANDataStop code of the table for which checksum checksumming is to be performed */
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
+typedef std::multimap<CANID, std::string> CAN_DeliveryEntryList;
+typedef CAN_DeliveryEntryList::iterator CAN_DeliveryEntryListIt;
+typedef std::pair<const CANID, std::string> CAN_DeliveryEntryListPair;
-/************************************************************************
-* Function prototype *
-************************************************************************/
-RET_CAN CANDataReceiveMsg(HANDLE h_app, CAN_MSG_DATA*); /* CANDataProcess of Received Messages */
-//RET_CAN CANDlcCheck(const T_ICR_CMD_DATA*); /* DLC check process */
-CANID CANCanidIfToUserCvt(uint8_t*); /* CAN ID Conversion Process 1 */
-CANID CANPacCanidIfToUserCvt(uint8_t*);
-RET_CAN CANDeliveryRcvData(HANDLE h_app, CANID ul_canid, uint8_t n_ta,
- uint8_t uc_dlc, uint8_t* puc_data_pos, uint8_t opc);
-RET_CAN CANDeliveryRcv_CWORD29_Data(HANDLE h_app, const uint16_t us_opc, uint32_t uc_dlc, uint8_t *puc_data_pos);
+void CANDeliveryInit(void);
+bool CANDeliveryInsert(CANID canid, std::string s);
+EFrameworkunifiedStatus CANDeliveryRcvProcess(HANDLE h_app, CanMessage *msg);
+EFrameworkunifiedStatus CANDeliveryEntry(HANDLE h_app);
+EFrameworkunifiedStatus CANClearEntry(HANDLE h_app);
+EFrameworkunifiedStatus CANDeliverySndMsg(HANDLE h_app, CANID ul_canid, uint8_t n_ta,
+ uint8_t uc_dlc, const uint8_t *puc_data,
+ PS_CommunicationProtocol cid, enum CanIfEchoBackFlags flag = CANIF_PURERECV);
+EFrameworkunifiedStatus CANCommandDeliveryRcvProcess(HANDLE h_app,
+ CanMessage *msg, uint8_t cmd);
#endif // COMMUNICATION_SERVER_INCLUDE_CAN_DELIVERY_CAN_DELIVERY_H_
diff --git a/communication/server/include/CAN/Delivery/CAN_DeliveryData.h b/communication/server/include/CAN/Delivery/CAN_DeliveryData.h
index 692b8216..ae0302c7 100644
--- a/communication/server/include/CAN/Delivery/CAN_DeliveryData.h
+++ b/communication/server/include/CAN/Delivery/CAN_DeliveryData.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -131,10 +131,7 @@ typedef struct {
************************************************************************/
void CANDeliveryDataInit(void); /* CANDataDelivery Management Data Initialization Process */
EFrameworkunifiedStatus CANDeliveryEntry(HANDLE h_app); /* CANDataDelivery registration process */
-EFrameworkunifiedStatus CAN_CWORD29_DeliveryEntry(HANDLE h_app); /* Process of registering the delivery of _CWORD29_ data */
void CANDeliveryBufferOut(FILE* fp_log); /* CAN shipping table log output processing */
-#ifdef CAN_DEBUG
-EFrameworkunifiedStatus CANAllDeleteDeliveryEntry(HANDLE h_app);
-#endif
+EFrameworkunifiedStatus CANClearEntry(HANDLE h_app);
#endif // COMMUNICATION_SERVER_INCLUDE_CAN_DELIVERY_CAN_DELIVERYDATA_H_
diff --git a/communication/server/include/CAN/TimerCtrl/CAN_TimerCtrl.h b/communication/server/include/CAN/TimerCtrl/CAN_TimerCtrl.h
deleted file mode 100644
index bf273dd7..00000000
--- a/communication/server/include/CAN/TimerCtrl/CAN_TimerCtrl.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_TIMERCTRL_CAN_TIMERCTRL_H_
-#define COMMUNICATION_SERVER_INCLUDE_CAN_TIMERCTRL_CAN_TIMERCTRL_H_
-/******************************************************************************
- * FILE :CAN_TimerCtrl.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
-#include "CAN_Thread.h"
-
-/************************************************************************
-* Macro Definitions *
-************************************************************************/
-#define CAN_TIM_RETRY_NUM 3 /* Number of retries for alarm API errors */
-/************************************************************************
-* Struct Definitions *
-************************************************************************/
-
-/***************************************************
-* TAG : CAN_TIMER_CTRL_DATA
-* ABSTRACT : Timer management data section structure
-****************************************************/
-typedef struct {
- uint16_t us_set_tim; /* Timeout value */
- uint16_t us_tim_cnt; /* Measured value of timer */
-} CAN_TIMER_CTRL_DATA;
-
-/***************************************************
-* TAG : CAN_FREQTRANS_TIMER
-* ABSTRACT : Periodic transmission timer management table structure
-****************************************************/
-typedef struct {
- uint16_t us_num; /* Number of timer registrations */
- uint8_t reserve[2]; /* Reserve */
- CAN_TIMER_CTRL_DATA data[CAN_FREQTRANS_TIMER_DATA]; /* Timer management data */
-} CAN_FREQTRANS_TIMER;
-
-/***************************************************
-* TAG : CAN_COMMWATCH_TIMER
-* ABSTRACT : Disruption monitoring timer management table structure
-****************************************************/
-typedef struct {
- uint16_t us_num; /* Number of timer registrations */
- uint8_t reserve[2]; /* Reserve */
- CAN_TIMER_CTRL_DATA data[CAN_COMMWATCH_TIMER_DATA]; /* Timer management data */
-} CAN_COMMWATCH_TIMER;
-
-/************************************************************************
-* Function Prototype *
-************************************************************************/
-RET_CAN CANFreqTransTimerStart(uint8_t, uint16_t, CAN_PROTOCOL_TYPE); /* Periodic transmission timer start processing */
-RET_CAN CANFreqTransTimerStop(uint8_t, CAN_PROTOCOL_TYPE); /* Periodic transmission timer start processing */
-RET_CAN CANCommWatchTimerStart(uint8_t, uint16_t, CAN_PROTOCOL_TYPE); /* Communication interruption monitoring timer start processing */
-RET_CAN CANCommWatchTimerStop(uint8_t, CAN_PROTOCOL_TYPE); /* Communication interruption monitoring timer stop processing */
-RET_CAN CANCommWatchTimerRenewal(uint8_t, CAN_PROTOCOL_TYPE); /* Communication interruption monitoring timer update processing */
-void CANFreqTransTimeOut(HANDLE h_app, uint16_t, CAN_PROTOCOL_TYPE); /* CAN periodic transmission timeout confirmation processing */
-void CANCommWatchTimeOut(HANDLE h_app, CAN_PROTOCOL_TYPE); /* CAN Communication Disruption Monitoring Timeout Confirmation Process */
-void CANTimerStart(uint16_t, CAN_TIMER_CTRL_DATA*); /* CAN Timer Master Processing */
-void CANTimerTblInit(void); /* CAN timer table initialization processing */
-
-void CANFreqTimerEntry(CANID canid, uint32_t);
-void CANFreqTransTimeOutMap(HANDLE h_app);
-RET_CAN CANFreqTransTimerStopMap(CANID);
-void CANFreqTimerResetMap(CANID);
-
-#endif // COMMUNICATION_SERVER_INCLUDE_CAN_TIMERCTRL_CAN_TIMERCTRL_H_
diff --git a/communication/server/include/CAN/Transmission/CAN_Transmission.h b/communication/server/include/CAN/Transmission/CAN_Transmission.h
deleted file mode 100644
index bca233ea..00000000
--- a/communication/server/include/CAN/Transmission/CAN_Transmission.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSION_H_
-#define COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSION_H_
-/******************************************************************************
- * FILE :CAN_Transmission.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-#include <native_service/frameworkunified_types.h>
-#include "CAN_Thread.h"
-
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-#define TIMER_SEQNO_MASK_CODE (uint16_t)(0x00FF) /* Mask code for acquiring timer sequence number */
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
-/* CANDataTransmission start message processing */
-EFrameworkunifiedStatus CANTxStart(HANDLE);
-/* CANDataSend start message check processing */
-RET_CAN CANTxStartMsgCheck(const CAN_TRANSMISSION_START_MSG_DAT *, uint8_t *);
-/* CANDataPeriodic transmission stop message processing */
-EFrameworkunifiedStatus CANFreqTxStop(HANDLE);
-/* CANDataPeriodic transmission time-up message processing */
-RET_CAN CANFreqTxTimeupMsg(HANDLE h_app, uint16_t);
-/* CANDataReceive message processing of transmission result */
-RET_CAN CANTxRsltReceiveMsg(HANDLE h_app, CAN_MSG_DATA *);
-/* CANDataSend result received message check processing */
-RET_CAN CANTxRsltReceiveMsgCheck(CAN_MSG_DATA *);
-/* CANData(_CWORD29_) outgoing message processing */
-EFrameworkunifiedStatus CAN_CWORD29_TxMsg(HANDLE h_app);
-EFrameworkunifiedStatus CANTxBitStart(HANDLE); /* CANDataTransmission start message processing */
-EFrameworkunifiedStatus CANTxBitStop(HANDLE); /* CANDataPeriodic transmission stop message processing */
-
-#endif // COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSION_H_
diff --git a/communication/server/include/CAN/Transmission/CAN_TransmissionData.h b/communication/server/include/CAN/Transmission/CAN_TransmissionData.h
deleted file mode 100644
index 0c389276..00000000
--- a/communication/server/include/CAN/Transmission/CAN_TransmissionData.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSIONDATA_H_
-#define COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSIONDATA_H_
-/******************************************************************************
- * FILE :CAN_TransmissionData.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-#include <native_service/frameworkunified_types.h>
-#include <peripheral_service/Canif_API.h>
-#include "Canif_API_Local.h"
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-/* Data size relationship */
-/* Maximum number of transmission results management tables */
-#define CAN_1TIME_TRSNSMISSION_RSLT_NUM 16
-#define CAN__CWORD29__TRSNSMISSION_RSLT_NUM 16
-
-/* Regular transmission, one transmission result management table relationship */
-#define CAN_TXRSLT_CANRID_START 0x00 /* Send result CANRID starting No. */
-/* Transmission result (1 transmission) CANRID starting number */
-#define CAN_TXRSLT_CANRID_1TIME_START CAN_FREQ_TRSNSMISSION_LIST_NUM
-/* Send result (_CWORD29_) CANRID starting number) */
-#define CAN_TXRSLT_CANRID__CWORD29__START (CAN_FREQ_TRSNSMISSION_LIST_NUM + CAN_1TIME_TRSNSMISSION_RSLT_NUM) // NOLINT(whitespace/line_length)
-/* Send result CANRID end No. */
-#define CAN_TXRSLT_CANRID_END (CAN_FREQ_TRSNSMISSION_LIST_NUM + CAN_1TIME_TRSNSMISSION_RSLT_NUM + CAN__CWORD29__TRSNSMISSION_RSLT_NUM - 1) // NOLINT(whitespace/line_length)
-
-/* Others */
-#define CAN_FREQ_TXRSLT_NUM 1 /* Number of notifications of periodic transmission results */
-
-#define LAN_TYPE_19PF "CAN_19PF"
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-/***************************************************
-* TAG : CAN_FREQ_TRANSMISSION_DAT
-* ABSTRACT : Periodic transmission management table structure (1 item)
-* Use in arrays when used
-* (CAN internal data management table)
-****************************************************/
-typedef struct { /* Type definitions for the periodic transmission management table (1 item) */
- uint16_t us_freq; /* Periodic transmission period (in 100ms) */
- // uint32_t notifyId; /* Thread ID */
- uint8_t uc_rid; /* Resources ID */
- uint8_t uc_resp_num; /* Number of transmission result notifications (number of remaining notifications) */
- uint8_t reserve[2]; /* Reserved */
- CAN_DATA st_can_data; /* Transmitted data */
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN_FREQ_TRANSMISSION_DAT;
-
-/***************************************************
-* TAG : CAN_1TIME_TXRSLT_DAT
-* ABSTRACT : One transmission result management table structure (1 item)
-* (CAN internal data management table)
-****************************************************/
-typedef struct { /* Defining the type of delivery destination CAN ID (1 item) */
- CANID ul_canid; /* CAN ID */
- // uint32_t notifyId; /* Addresses for delivery ID */
- uint8_t uc_rid; /* Resources ID */
- uint8_t reserve; /* Reserved */
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN_1TIME_TXRSLT_DAT;
-
-/***************************************************
-* TAG : CAN_1TIME_TXRSLT_MSG_DAT
-* ABSTRACT : List of Messages Sent Once (1 item)
-* (CAN-internal Work)
-****************************************************/
-typedef struct { /* Defining the type of delivery destination CAN ID (1 item) */
- CANID ul_canid; /* CAN ID */
- // uint32_t notifyId; /* Addresses for delivery ID */
- uint8_t uc_rid; /* Resources ID */
- uint8_t uc_sts; /* Transmission result status */
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN_1TIME_TXRSLT_MSG_DAT;
-
-/***************************************************
-* TAG : CAN_1TIME_TXRSLT_MSG_LIST_DAT
-* ABSTRACT : List of Messages Sent Once (All Messages)
-* (CAN-internal Work)
-****************************************************/
-typedef struct { /* Type definition of the delivery destination ID data to which the message is sent */
- int32_t i_num; /* Number of messages sent */
- CAN_1TIME_TXRSLT_MSG_DAT st_list[CAN_1TIME_TRSNSMISSION_RSLT_NUM]; /* List */
-} CAN_1TIME_TXRSLT_MSG_LIST_DAT;
-
-/***************************************************
-* TAG : CAN__CWORD29__TXRSLT_DAT
-* ABSTRACT : _CWORD29_ send result control table structure (1 item)
-* (CAN internal data management table)
-****************************************************/
-typedef struct {
- uint16_t opc; /* OPC */
- uint8_t uc_rid; /* Resources ID */
- char notify_name[MAX_NAME_SIZE_APP]; /* Destination thread name */
-} CAN__CWORD29__TXRSLT_DAT;
-
-/***************************************************
-* TAG : CAN_TRANS_START_TABLE_VAL
-* ABSTRACT : Transmit data management table structure (1 item)
-* (CAN internal data management table)
-****************************************************/
-typedef struct {
- uint8_t dlc;
- CAN_DATA_BIT dat;
-} CAN_TRANS_START_TABLE_VAL;
-
-/***************************************************
-* TAG : CAN_INIT_TABLE
-* ABSTRACT : Transmission data initial value management table structure
-****************************************************/
-typedef struct {
- CANID canid;
- CAN_TRANS_START_TABLE_VAL val;
-} CAN_INIT_TABLE;
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
-void CANTransmissionDataInit(void);
-BOOL CANFreqTransEntryCheck(CANID canid, uint8_t *);
-void CANFreqTransEntry(uint8_t, const CAN_TRANSMISSION_START_MSG_DAT *);
-void CANFreqTransDataGet(uint8_t uc_index, CAN_FREQ_TRANSMISSION_DAT *pst_data);
-BOOL CANFreqTransCanidEntryCheck(uint8_t, CANID);
-BOOL CANFreqTransIdEntryCheck(uint8_t, PCSTR);
-void CANFreqTransStop(uint8_t);
-BOOL CANFreqTransIndexEntryCheck(uint8_t);
-BOOL CAN1TimeTransEntryCheck(uint8_t *);
-BOOL CAN_CWORD29_TransEntryCheck(uint8_t *);
-EFrameworkunifiedStatus CAN1TimeTransEntry(uint8_t, const CAN_TRANSMISSION_START_MSG_DAT *);
-EFrameworkunifiedStatus CAN_CWORD29_TransEntry(uint8_t, const CAN__CWORD29__TRANS_MSG *);
-BOOL CANTxRsltEntryCheck(uint8_t);
-void CANTxRsltDataGet(uint8_t, CAN_1TIME_TXRSLT_DAT *);
-void CAN_CWORD29_TxRsltDataGet(const uint8_t, CAN__CWORD29__TXRSLT_DAT* const);
-void CANTxRsltFin(uint8_t);
-void CAN_CWORD29_TxRsltFin(const uint8_t);
-BOOL CANTxRsltSndCheck(uint8_t, uint32_t);
-void CANCycleTransBufferOut(FILE *fp_log);
-
-BOOL CANTransDataEntry(CAN_TRANS_START_MSG_DAT *);
-BOOL CANTransStartTxMsg(HANDLE h_app, CANID);
-BOOL CANEntryTransCanidCheck(CANID);
-
-BOOL CAN_SubIDTransStartTxMsg(HANDLE h_app, CAN_TRANS_START_MSG_DAT *);
-
-#endif // COMMUNICATION_SERVER_INCLUDE_CAN_TRANSMISSION_CAN_TRANSMISSIONDATA_H_
diff --git a/communication/server/include/CAN/TxMsg/CAN_TxMsg.h b/communication/server/include/CAN/TxMsg/CAN_TxMsg.h
index 15fc56d1..dc4f6e8e 100644
--- a/communication/server/include/CAN/TxMsg/CAN_TxMsg.h
+++ b/communication/server/include/CAN/TxMsg/CAN_TxMsg.h
@@ -1,5 +1,5 @@
/*
- * @copyright Copyright (c) 2016-2019 TOYOTA MOTOR CORPORATION.
+ * @copyright Copyright (c) 2016-2020 TOYOTA MOTOR CORPORATION.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,101 +16,39 @@
#ifndef COMMUNICATION_SERVER_INCLUDE_CAN_TXMSG_CAN_TXMSG_H_
#define COMMUNICATION_SERVER_INCLUDE_CAN_TXMSG_CAN_TXMSG_H_
-/******************************************************************************
- * FILE :CAN_TxMsg.h
- * SYSTEM :_CWORD107_
- * SUBSYSTEM :
- ******************************************************************************/
-
+#include <vector>
+#include <map>
+#include <string>
+#include <can_hal.h>
#include "CAN_Thread.h"
+#include "API_Local_Common.h"
+#include "Canif_API_Local.h"
+
+
+#define CAN_OPC_PAC_RX 0x00
+#define CAN_OPC_COMMAND_STARTUP_FIN_REQ_TX 0x00 // CAN start completion notification request transmission
+#define CAN_OPC_COMMAND_MRST_INFO_REQ_TX 0x01 // CAN master reset information notification request transmission
+#define CAN_OPC_COMMAND_VERSION_REQ_TX 0x02 // CAN Version Request Send
+#define CAN_OPC_COMMAND_CONNECTION_NODE_REQ_TX 0x03 // CAN connection node notification request transmission
+#define CAN_OPC_COMMAND_BUS_STATUS_REQ_TX 0x04 // CAN bus status notification request transmission
+#define CAN_OPC_COMMAND_FUELCALC_REQ_TX 0x05 // CAN section flame reset response transmission
+#define CAN_OPC_COMMAND_STARTUP_FIN_RESP_RX 0x06 // CAN startup completion notice received
+#define CAN_OPC_COMMAND_MRST_INFO_RESP_RX 0x07 // CAN Master Reset Information Notification Reception
+#define CAN_OPC_COMMAND_VERSION_RESP_RX 0x08 // CAN Version Response Reception
+#define CAN_OPC_COMMAND_CONNECTION_NODE_RESP_RX 0x09 // Receive CAN Connection Node Notification Response
+#define CAN_OPC_COMMAND_BUS_STATUS_RESP_RX 0x10 // CAN Bus Status Notification Response Reception
+#define CAN_OPC_COMMAND_FUELCALC_RST_REQ_RX 0x11 // RECEIVE REQUEST FREE OF CAN SECTION
-/************************************************************************
-* Macro definitions *
-************************************************************************/
-#define CAN_TX_COMM_KIND 0x00 /* CANDataCommunication type for transmission */
-#define CAN_TX_PHYS_ADRS 0x0000 /* CANDataPhysical address for transmission */
-#define CAN_TX_FROM_ADRS 0x00 /* CANDataSource address for sending (wildcard) */
-#define CAN_TX_TO_ADRS 0x00 /* CANDataDestination address for sending (wildcard) */
-
-/****** OPC ******/
-#define CAN_OPC_RX 0x00 /* CANData reception notice */
-#define CAN_OPC_PAC_RX 0x00 /* CAN Packaging Data Reception Notification */
-#define CAN_OPC_TX 0x00 /* CANDataReport request */
-
-#define CAN_OPC_COMMAND_STARTUP_FIN_REQ_TX 0x00 /* CAN start completion notification request transmission */
-#define CAN_OPC_COMMAND_MRST_INFO_REQ_TX 0x01 /* CAN master reset information notification request transmission */
-#define CAN_OPC_COMMAND_VERSION_REQ_TX 0x02 /* CAN Version Request Send */
-#define CAN_OPC_COMMAND_CONNECTION_NODE_REQ_TX 0x03 /* CAN connection node notification request transmission */
-#define CAN_OPC_COMMAND_BUS_STATUS_REQ_TX 0x04 /* CAN bus status notification request transmission */
-#define CAN_OPC_COMMAND_FUELCALC_REQ_TX 0x05 /* CAN section flame reset response transmission */
-#define CAN_OPC_COMMAND_STARTUP_FIN_RESP_RX 0x06 /* CAN startup completion notice received */
-#define CAN_OPC_COMMAND_MRST_INFO_RESP_RX 0x07 /* CAN Master Reset Information Notification Reception */
-#define CAN_OPC_COMMAND_VERSION_RESP_RX 0x08 /* CAN Version Response Reception */
-#define CAN_OPC_COMMAND_CONNECTION_NODE_RESP_RX 0x09 /* Receive CAN Connection Node Notification Response */
-#define CAN_OPC_COMMAND_BUS_STATUS_RESP_RX 0x10 /* CAN Bus Status Notification Response Reception */
-#define CAN_OPC_COMMAND_FUELCALC_RST_REQ_RX 0x11 /* RECEIVE REQUEST FREE OF CAN SECTION */
-
-/************************************************************************
-* Struct definitions *
-************************************************************************/
-/***************************************************
-* TAG : CAN_TXMSG_DAT
-* ABSTRACT : CANDataTransmission data section structure
-* (Data structure passed from tha CAN to router)
-****************************************************/
-typedef struct { /* Type definition of send command */
- uint8_t reserve; /* Reserved */
- uint8_t uc_length; /* Data length */
- uint8_t uc_kind_padrs; /* Data type/Physical address */
- uint8_t uc_p_adrs; /* Physical address */
- uint8_t uc_from_adrs; /* Source address */
- uint8_t uc_to_adrs; /* Forwarding address */
- uint8_t uc_opc; /* OPC */
- uint8_t uc_operand[CAN_TX_OPERAND_SIZE]; /* Operand*/
-} CAN_TXMSG_DAT;
-
-/***************************************************
-* TAG : CAN_TXMSG
-* ABSTRACT : CANDataTransmission data section structure
-* (Data structure passed from tha CAN to router)
-****************************************************/
-typedef struct { /* For main processing */
-// T_APIMSG_MSGBUF_HEADER_COMM st_head; /* Header */
- CAN_TXMSG_DAT st_data; /* Data portion */
-} CAN_TXMSG;
-
-/***************************************************
-* TAG : HANDLE_DAT
-* ABSTRACT : MapHandler data-section structures
-****************************************************/
typedef struct {
- HANDLE handle;
- BOOL is_q_full; /* Queue full judgment flag */
-} HANDLE_DAT;
-
-/************************************************************************
-* Function prototype *
-************************************************************************/
-BOOL CANDeliverySndMsg(HANDLE h_app, CANID canid, uint8_t, const uint8_t *, uint8_t, uint8_t);
-BOOL CANDelivery_CWORD29_SndMsg(HANDLE h_app, const uint16_t us_opc, uint32_t uc_dlc, const uint8_t *puc_data);
-/* CANDataDelivery Messages Sending Process (Except for CANGW) */
-BOOL CANDeliverySndMsgToCANGW(HANDLE h_app, CAN_MSG_CANGWDATA *cangw_data);
-/* CAN-data-delivery-messaging process to the CANGW */
-BOOL CANFreqTransStartTxMsg(HANDLE h_app, uint8_t); /* CANDataPeriodic transmission start message transmission processing */
-BOOL CAN1TimeTransStartTxMsg(HANDLE h_app, uint8_t, const CAN_DATA *); /* CANDataSend one transmission start message processing */
-void CANCommWatchSndMsg(HANDLE h_app, uint8_t); /* CANDataTransmission of communication interruption detection/recovery message */
-BOOL CANTxRsltSndMsg(HANDLE h_app, uint8_t, uint8_t); /* CANDataTransmission result notification message transmission processing */
-/* _CWORD29_ data transmission result notification message transmission process */
-BOOL CAN_CWORD29_TxRsltSndMsg(const HANDLE h_app, const uint8_t uc_can_rid, const uint8_t uc_status);
-void CANCanidUserToIfCvt(CANID canid, uint8_t *); /* CAN ID Conversion Process 2 */
-
-BOOL CANCommandDeliverySndMsg(HANDLE h_app, uint8_t, const uint8_t *); /* CAN command delivery message transmission processing */
-BOOL CANCommandTxRsltSndMsg(HANDLE h_app, uint8_t, uint8_t); /* CAN command transmission result notification message transmission processing */
-BOOL CANCommandTransmissionSndMsg(uint8_t, uint8_t); /* CAN command message transmission processing */
-BOOL CANCommandFuelCalcRstReqSndMsg(HANDLE h_app, PCSTR name); /* CAN section flame reset request reception message transmission processing */
-BOOL CANCommandidOpcToUserCvt(uint8_t, uint8_t *); /* CAN Command ID Conversion Processing 1 */
-BOOL CANCommandidUserToOpcCvt(uint8_t, uint8_t *); /* CAN command ID conversion process 2 */
-
-BOOL CANTransStartTxMsgCore(HANDLE h_app, CANID canid, uint8_t, CAN_DATA_BIT *);
-
+ uint8_t rid;
+ char notify_name[CANIF_NOTIFY_NAME_MAX_SIZE + 1];
+} CAN_SEND_STATUS_DAT;
+
+void CANTxMsgInit(void);
+EFrameworkunifiedStatus CANTxMsg(HANDLE h_app);
+EFrameworkunifiedStatus CANTxMsgBit(HANDLE h_app);
+void CANCommandSetFuelCalcRstReq(void);
+EFrameworkunifiedStatus CANTxMsgCommand(HANDLE h_app);
+EFrameworkunifiedStatus CANSndStsProcess(HANDLE h_app, CanSendResult *rcv_msg,
+ PS_CommunicationProtocol cid);
#endif // COMMUNICATION_SERVER_INCLUDE_CAN_TXMSG_CAN_TXMSG_H_