Subversion Repositories HomeAutomation

Rev

Rev 988 | Rev 1062 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 988 Rev 989
Line 11... Line 11...
11
    ///TODO: Stuff that needs doing is done here
11
    ///TODO: Stuff that needs doing is done here
12
}
12
}
13
 
13
 
14
void <template>_HandleMessage(StdCan_Msg_t *rxMsg)
14
void <template>_HandleMessage(StdCan_Msg_t *rxMsg)
15
{
15
{
16
    if (    StdCan_Ret_class(rxMsg->Header) == CAN_CLASS_MODULE_DEF && ///TODO: Change this to the actual class type
16
    if (    StdCan_Ret_class(rxMsg->Header) == CAN_MODULE_CLASS_xyz && ///TODO: Change this to the actual class type
17
        StdCan_Ret_direction(rxMsg->Header) == DIR_TO_OWNER &&
17
        StdCan_Ret_direction(rxMsg->Header) == DIRECTIONFLAG_FROM_OWNER &&
18
        rxMsg->Header.ModuleType == CAN_TYPE_MODULE_def_default && ///TODO: Change this to the actual module type
18
        rxMsg->Header.ModuleType == CAN_MODULE_TYPE_xyz && ///TODO: Change this to the actual module type
19
        rxMsg->Header.ModuleId == <template>_ID)
19
        rxMsg->Header.ModuleId == <template>_ID)
20
    {
20
    {
21
        switch (rxMsg->Header.Command)
21
        switch (rxMsg->Header.Command)
22
        {
22
        {
23
        case CAN_CMD_MODULE_DUMMY:
23
        case CAN_CMD_MODULE_DUMMY:
Line 29... Line 29...
29
 
29
 
30
void <template>_List(uint8_t ModuleSequenceNumber)
30
void <template>_List(uint8_t ModuleSequenceNumber)
31
{
31
{
32
    StdCan_Msg_t txMsg;
32
    StdCan_Msg_t txMsg;
33
   
33
   
34
    StdCan_Set_class(txMsg.Header, CAN_CLASS_MODULE_DEF); ///TODO: Change this to the actual class type
34
    StdCan_Set_class(txMsg.Header, CAN_MODULE_CLASS_xyz); ///TODO: Change this to the actual class type
35
    StdCan_Set_direction(txMsg.Header, DIR_FROM_OWNER);
35
    StdCan_Set_direction(txMsg.Header, DIRECTIONFLAG_FROM_OWNER);
36
    txMsg.Header.ModuleType = CAN_TYPE_MODULE_def_default; ///TODO: Change this to the actual module type
36
    txMsg.Header.ModuleType = CAN_MODULE_TYPE_xyz; ///TODO: Change this to the actual module type
37
    txMsg.Header.ModuleId = <template>_ID;
37
    txMsg.Header.ModuleId = <template>_ID;
38
    txMsg.Header.Command = CAN_MODULE_CMD_GLOBAL_LIST;
38
    txMsg.Header.Command = CAN_MODULE_CMD_GLOBAL_LIST;
39
    txMsg.Length = 6;
39
    txMsg.Length = 6;
40
 
40
 
41
    txMsg.Data[0] = NODE_HW_ID_BYTE0;
41
    txMsg.Data[0] = NODE_HW_ID_BYTE0;