Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008 #ifndef KINOVA_DLL_COMMLAYERUBUNTU_H_
00009 #define KINOVA_DLL_COMMLAYERUBUNTU_H_
00010
00011 #endif
00012
00013 #ifdef KINOVADLLCOMMLAYER_EXPORTS
00014 #define KINOVADLLCOMMLAYER_API __declspec(dllexport)
00015 #else
00016 #define KINOVADLLCOMMLAYER_API __declspec(dllimport)
00017 #endif
00018 namespace jaco_arm {
00019
00020 #define NO_ERROR 1
00021 #define ERROR_LOAD_USB_LIBRARY 1001
00022 #define ERROR_INIT_COMM_METHOD 1002
00023 #define ERROR_GET_DEVICE_COUNT_METHOD 1003
00024 #define ERROR_SEND_PACKET_METHOD 1006
00025 #define ERROR_GET_DLL_VERSION_METHOD 1007
00026 #define ERROR_OPEN_METHOD 1008
00027 #define ERROR_WRITE_METHOD 1009
00028 #define ERROR_READ_METHOD 1010
00029 #define ERROR_READ_INT_METHOD 1011
00030 #define ERROR_CLOSE_METHOD 1012
00031 #define ERROR_FREE_LIBRARY 1013
00032 #define ERROR_JACO_CONNECTION 1014
00033 #define ERROR_CLAIM_INTERFACE 1015
00034
00035 #define PACKET_SIZE 64
00036 #define PACKET_DATA_SIZE 56
00037 #define PACKET_HEADER_SIZE 8
00038
00039 #define COMM_LAYER_VERSION 10000
00040
00041 struct Packet
00042 {
00043 short IdPacket;
00044 short TotalPacketCount;
00045 short IdCommand;
00046 short TotalDataSize;
00047 unsigned char Data[PACKET_DATA_SIZE];
00048 };
00049
00050 extern "C" __attribute__ ((visibility ("default"))) int InitCommunication(void);
00051
00052 extern "C" __attribute__ ((visibility ("default"))) int CloseCommunication(void);
00053
00054 extern "C" __attribute__ ((visibility ("default"))) int GetDeviceCount(int &result);
00055
00056 extern "C" __attribute__ ((visibility ("default"))) Packet SendPacket(Packet &packetOut, Packet &packetIn, int &result);
00057 }