};
typedef struct CanMessageDefinition CanMessageDefinition;
+class can_message_definition_t
+{
+ private:
+ can_bus_dev_t& bus_; /*!< bus - A pointer to the bus this message is on. */
+ uint32_t id_; /*!< id - The ID of the message.*/
+ CanMessageFormat format_; /*!< format - the format of the message's ID.*/
+ FrequencyClock clock_; /*!< clock - an optional frequency clock to control the output of this
+ * message, if sent raw, or simply to mark the max frequency for custom
+ * handlers to retriec++ if ? syntaxve.*/
+ bool forceSendChanged_; /*!< forceSendChanged - If true, regardless of the frequency, it will send CAN
+ * message if it has changed when using raw passthrough.*/
+ uint8_t lastValue_[CAN_MESSAGE_SIZE]; /*!< lastValue - The last received value of the message. Defaults to undefined.
+ * This is required for the forceSendChanged functionality, as the stack
+ * needs to compare an incoming CAN message with the previous frame.*/
+
+ public:
+};
+
/**
* @struct CanMessageSet
*
unsigned short commandCount; /*!< commandCount - The number of CanCommmands defined for this message set.*/
} CanMessageSet;
+class can_message_set_t
+{
+ private:
+ uint8_t index; /*!<index - A numerical ID for the message set, ideally the index in an array
+ * for fast lookup*/
+ const std::string name; /*!< name - The name of the message set.*/
+ uint8_t can_bus_count; /*!< busCount - The number of CAN buses defined for this message set.*/
+ unsigned short can_message_count; /*!< messageCount - The number of CAN messages (across all buses) defined for
+ * this message set.*/
+ unsigned short can_signal_count; /*!< signalCount - The number of CAN signals (across all messages) defined for
+ * this message set.*/
+ unsigned short can_command_count; /*!< commandCount - The number of CanCommmands defined for this message set.*/
+ unsigned short obd2_signal_count; /*!< commandCount - The number of obd2 signals defined for this message set.*/
+};
+
/** Public: Return the currently active CAN configuration. */
CanMessageSet* getActiveMessageSet();