Beispiel #1
0
void MrCs2EncStatus5(MrCs2CanDataType *CanMsg, unsigned long Uid, int Index)
{
   SetLongToByteArray(CanMsg->Data, Uid);
   CanMsg->Data[4] = (unsigned char)Index;
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_STATUS);
   MrCs2SetDlc(CanMsg, 5);
}
Beispiel #2
0
void MrCs2EncSysCycleEnd(MrCs2CanDataType *CanMsg, unsigned long Uid)
{
   SetLongToByteArray(CanMsg->Data, Uid);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SYSTEM);
   MrCs2SetSystemSubcmd(CanMsg, MR_CS2_SUBCMD_SYSTEM_CYCLE_END);
   MrCs2SetDlc(CanMsg, 5);
}
Beispiel #3
0
void MrCs2EncSysSystemId5(MrCs2CanDataType *CanMsg, unsigned long Uid)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SYSTEM);
   MrCs2SetSystemSubcmd(CanMsg, MR_CS2_SUBCMD_SYSTEM_SYSTEM_ID);
   MrCs2SetDlc(CanMsg, 5);
}
Beispiel #4
0
void MrCs2EncSpeed6(MrCs2CanDataType *CanMsg, unsigned long LocId, int Speed)
{
   SetLongToByteArray((char *)CanMsg->Data, LocId);
   SetIntToByteArray((char *)&(CanMsg->Data[4]), Speed);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SPEED);
   MrCs2SetDlc(CanMsg, 6);
}
Beispiel #5
0
void MrCs2EncCfgdatStream6(MrCs2CanDataType *CanMsg, unsigned long Length,
                           int Crc)
{
   SetLongToByteArray(CanMsg->Data, Length);
   SetIntToByteArray(&(CanMsg->Data[4]), Crc);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_CFGDAT_STREAM);
   MrCs2SetDlc(CanMsg, 6);
}
Beispiel #6
0
void MrCs2EncS88Poll5(MrCs2CanDataType *CanMsg, unsigned long Uid,
                      int NumModuls)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   CanMsg->Data[4] = NumModuls;
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_S88_POLL);
   MrCs2SetDlc(CanMsg, 5);
}
Beispiel #7
0
void MrCs2EncPing8(MrCs2CanDataType *CanMsg, unsigned long Uid,
                   int SwVersion, int DeviceId)
{
   SetLongToByteArray(CanMsg->Data, Uid);
   SetIntToByteArray(&(CanMsg->Data[4]), SwVersion);
   SetIntToByteArray(&(CanMsg->Data[6]), DeviceId);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_PING);
   MrCs2SetDlc(CanMsg, 8);
}
Beispiel #8
0
void MrCs2EncSysOverload(MrCs2CanDataType *CanMsg, unsigned long Uid,
                         int Channel)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   CanMsg->Data[5] = Channel;
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SYSTEM);
   MrCs2SetSystemSubcmd(CanMsg, MR_CS2_SUBCMD_SYSTEM_OVERLOAD);
   MrCs2SetDlc(CanMsg, 6);
}
Beispiel #9
0
void MrCs2EncSysResetMfxCounter(MrCs2CanDataType *CanMsg, unsigned long Uid,
                                int Counter)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   SetIntToByteArray((char *)&(CanMsg->Data[5]), Counter);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SYSTEM);
   MrCs2SetSystemSubcmd(CanMsg, MR_CS2_SUBCMD_SYSTEM_RESET_MFX_COUNTER);
   MrCs2SetDlc(CanMsg, 7);
}
Beispiel #10
0
void MrCs2EncStatus6(MrCs2CanDataType *CanMsg, unsigned long Uid, int Index,
                     int NumPackets)
{
   SetLongToByteArray(CanMsg->Data, Uid);
   CanMsg->Data[4] = (unsigned char)Index;
   CanMsg->Data[5] = (unsigned char)NumPackets;
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_STATUS);
   MrCs2SetDlc(CanMsg, 6);
}
Beispiel #11
0
void MrCs2EncS88Poll7(MrCs2CanDataType *CanMsg, unsigned long Uid,
                      int Modul, int State)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   CanMsg->Data[4] = Modul;
   SetIntToByteArray((char *)&(CanMsg->Data[5]), State);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_S88_POLL);
   MrCs2SetDlc(CanMsg, 7);
}
Beispiel #12
0
void MrCs2EncSysDataProtocoll(MrCs2CanDataType *CanMsg, unsigned long Uid,
                              int Proto)
{
   SetLongToByteArray((char *)CanMsg->Data, Uid);
   CanMsg->Data[5] = Proto;
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SYSTEM);
   MrCs2SetSystemSubcmd(CanMsg, MR_CS2_SUBCMD_SYSTEM_DATA_PROTOCOLL);
   MrCs2SetDlc(CanMsg, 6);
}
Beispiel #13
0
void MrCs2EncSpeed4(MrCs2CanDataType *CanMsg, unsigned long LocId)
{
   SetLongToByteArray((char *)CanMsg->Data, LocId);
   MrCs2SetCommand(CanMsg, MR_CS2_CMD_SPEED);
   MrCs2SetDlc(CanMsg, 4);
}