Skip to content

Commit

Permalink
MAC22: New module described.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoantoniocardoso committed Feb 25, 2022
1 parent 4df0d55 commit 0c437fa
Show file tree
Hide file tree
Showing 3 changed files with 133 additions and 0 deletions.
25 changes: 25 additions & 0 deletions can_ids.h
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,31 @@
#define CAN_MSG_MCB19_2_MEASUREMENTS_DT_UNITS "%/255"


// MAC22 - Modulo de Acionamento da Contatora
#define CAN_SIGNATURE_MAC22 180
// MAC22 - STATE - Module state report
#define CAN_MSG_MAC22_STATE_ID 16
#define CAN_MSG_MAC22_STATE_LENGTH 3
#define CAN_MSG_MAC22_STATE_SIGNATURE_BYTE 0 //<!" Senders signature
#define CAN_MSG_MAC22_STATE_SIGNATURE_TYPE "u8"
#define CAN_MSG_MAC22_STATE_SIGNATURE_UNITS ""
#define CAN_MSG_MAC22_STATE_STATE_BYTE 1 //<!" State code
#define CAN_MSG_MAC22_STATE_STATE_TYPE "u8"
#define CAN_MSG_MAC22_STATE_STATE_UNITS ""
#define CAN_MSG_MAC22_STATE_ERROR_BYTE 2 //<!" Error code
#define CAN_MSG_MAC22_STATE_ERROR_TYPE "u8"
#define CAN_MSG_MAC22_STATE_ERROR_UNITS ""
// MAC22 - CONTACTOR - Contactor task response
#define CAN_MSG_MAC22_CONTACTOR_ID 17
#define CAN_MSG_MAC22_CONTACTOR_LENGTH 2
#define CAN_MSG_MAC22_CONTACTOR_SIGNATURE_BYTE 0 //<!" Senders signature
#define CAN_MSG_MAC22_CONTACTOR_SIGNATURE_TYPE "u8"
#define CAN_MSG_MAC22_CONTACTOR_SIGNATURE_UNITS ""
#define CAN_MSG_MAC22_CONTACTOR_RESPONSE_BYTE 1 //<!" Contactor task response
#define CAN_MSG_MAC22_CONTACTOR_RESPONSE_TYPE "u8"
#define CAN_MSG_MAC22_CONTACTOR_RESPONSE_UNITS ""


// MAM19 - Modulo de Acionamento do Motor
#define CAN_SIGNATURE_MAM19 190
// MAM19 - STATE - Module state report
Expand Down
62 changes: 62 additions & 0 deletions can_ids.json
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,68 @@
}
]
},
{
"name": "MAC22",
"description": "Modulo de Acionamento da Contatora",
"signature": 180,
"topics": [
{
"name": "STATE",
"description": "Module state report",
"id": 16,
"bytes": [
{
"name": "SIGNATURE",
"description": "Senders signature",
"type": "u8",
"units": ""
},
{
"name": "STATE",
"description": "State code",
"type": "u8",
"units": ""
},
{
"name": "ERROR",
"description": "Error code",
"type": "u8",
"units": ""
},
null,
null,
null,
null,
null
]
},
{
"name": "CONTACTOR",
"description": "Contactor task response",
"id": 17,
"bytes": [
{
"name": "SIGNATURE",
"description": "Senders signature",
"type": "u8",
"units": ""
},
{
"name": "RESPONSE",
"description": "Contactor task response",
"type": "u8",
"units": ""
},
null,
null,
null,
null,
null,
null
]
}
]
},
{
"name": "MAM19",
"description": "Modulo de Acionamento do Motor",
Expand Down
46 changes: 46 additions & 0 deletions can_ids_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,52 @@
module_mcb19_2.add_topic(topic_measurements)
can.add_module(module_mcb19_2)

################################################################################
### MODULE: MAC22
module_mac22 = can.module(
name = "mac22",
signature = 180,
description = "Modulo de Acionamento da Contatora"
)
#### TOPIC: STATE
topic_state = can.topic(
msg = "state",
id = 0b10000,
description = "Module state report"
)
topic_state.describe_byte(
name = "state",
byte = 1,
description = "State code",
btype = "u8",
units = ""
)
topic_state.describe_byte(
name = "error",
byte = 2,
description = "Error code",
btype = "u8",
units = ""
)
#### TOPIC: CONTACTOR
topic_contactor = can.topic(
msg = "contactor",
id = 0b10001,
description = "Contactor task response"
)
topic_contactor.describe_byte(
name = "response",
byte = 1,
description = "Contactor task response",
btype = "u8",
units = ""
)

module_mac22.add_topic(topic_state)
module_mac22.add_topic(topic_contactor)
can.add_module(module_mac22)


################################################################################
### MODULE: MAM19
module_mam19 = can.module(
Expand Down

0 comments on commit 0c437fa

Please sign in to comment.