00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00018
00019 #ifndef CanOpenStructsH
00020 #define CanOpenStructsH
00021
00022
00023 #define DIRECTION_RECEIVE 0
00024 #define DIRECTION_TRANSMIT 1
00025
00026
00027
00028 #define RECEIVE_PDO_MAPPING_STARTADRESS 0x1600
00029 #define RECEIVE_PDO_MAPPING_MAXADRESS 0x17FF
00030 #define TRANSMIT_PDO_MAPPING_STARTADRESS 0x1A00
00031 #define TRANSMIT_PDO_MAPPING_MAXADRESS 0x1BFF
00032 #define MAX_NODES 127
00033 #define MAX_SDO_BUFFERSIZE 246
00034
00035
00036
00038 #define CAN_TASK 3
00039 #define USER_AT_HOST 16
00040 #define CMDCODE_GET_CONFIGURATION 15
00041 #define CMDCODE_SDO_UPDOWNLOAD 74
00042 #define CMDCODE_Node_Diag 66
00043 #define CMD_NMT_Module_Protocol 96
00044
00046 #define CMD_NMT_START_REMOTE_NODE 1
00047 #define CMD_NMT_STOP_REMOTE_NODE 2
00048 #define CMD_NMT_ENTER_PREOPERATIONAL 128
00049 #define CMD_NMT_RESET_NODE 129
00050 #define CMD_NMT_RESET_COMMUNICATION 130
00051
00052 #define TASK_TFC_READ 1
00053 #define TASK_TFC_WRITE 2
00054 #define RESPONSE_CODE_GET_CONFIGURATION 15
00055
00056 #define DATA_DIRECTION_MASK 0x30
00057 #define DIRECTION_INPUT 0x10
00058 #define DIRECTION_OUTPUT 0x20
00059
00061 #define ERRCODE_NOERROR 0
00062 #define ERRCODE_INVALID_NODEID -2
00063 #define ERRCODE_INVALID_PDOID -3
00064 #define ERRCODE_PDOSND_FAIL -4
00065 #define ERRCODE_INVALID_MAPID -5
00066 #define ERRCODE_INVALID_RLTYPE -6
00067 #define ERRCODE_PDORCV_FAIL -7
00068
00070 #define COLDSTART 2
00071 #define WARMSTART 3
00072 #define BOOTSTART 4
00073
00075 struct rlCanMapping
00076 {
00078 unsigned short mappingId;
00079
00081 int etype;
00082
00084 int canopentype;
00085
00087 unsigned short position;
00088
00090 unsigned short length;
00091 } ;
00092
00093
00094
00096 struct rlCanPDO
00097 {
00099 short bPDODirection;
00100
00102 unsigned char bPDOSize;
00103
00105 unsigned char bDataPosition;
00106
00108 unsigned short usPDOAddress;
00109
00111 QPtrVector<rlCanMapping> mappingList;
00112
00114 int mappingOvAdress;
00115 };
00116
00117
00118
00119 #endif
00120