00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef JAUS_MESSAGE_H
00010 #define JAUS_MESSAGE_H
00011 #include <types.h>
00012 #include <fixedpoint.h>
00013 #include <utility/status.h>
00014
00015
00016 #define DONT_CARE 0
00017 #define BAD_INSTANCE 0
00018 #define BAD_SUBTYPE 0
00019
00020 #define DEFAULT_SUBTYPE 0
00021 #define IR_SUBTYPE 1
00022 #define SONAR_SUBTYPE 2
00023
00024
00026
00027
00028
00029
00030 #define JAUS_DECLARATION_LENGTH 176
00031
00032
00033
00034 #define Maximum_JAUS_Output_Message_Size 48
00035
00036 #define Maximum_JAUS_MAP_Output_Message_Size 32
00037
00038 #define MAX_JAUS_MESSAGE_LENGTH JAUS_DECLARATION_LENGTH
00039 #define JAUS_PRIORITY(jaus_pointer) (jaus_pointer->_message.header.properties.bits.priority)
00040 #define JAUS_SOURCE_INSTANCE(jaus_pointer) (jaus_pointer->_message.header.source.bits.instance)
00041 #define JAUS_DEST_INSTANCE(jaus_pointer) (jaus_pointer->_message.header.destination.bits.instance)
00042 #define JAUS_SOURCE_COMPONENT(jaus_pointer) (jaus_pointer->_message.header.source.bits.component)
00043 #define JAUS_DEST_COMPONENT(jaus_pointer) (jaus_pointer->_message.header.destination.bits.component)
00044 #define JAUS_SOURCE_NODE(jaus_pointer) (jaus_pointer->_message.header.source.bits.node)
00045 #define JAUS_DEST_NODE(jaus_pointer) (jaus_pointer->_message.header.destination.bits.node)
00046 #define JAUS_SUSSYSTEM(jaus_pointer) (jaus_pointer->_message.header.source.bits.subsystem)
00047 #define JAUS_COMMAND_CODE(jaus_pointer) (JAUS_MESSAGE(jaus_pointer->_message.header.command_code))
00048 #define JAUS_COPY(pjausD,pjausS) for (short imxxx=0; imxxx<(Maximum_JAUS_Output_Message_Size+JAUS_HEADER_LENGTH); imxxx++) ((char*)pjausD)[imxxx] = ((char*)pjausS)[imxxx]
00049
00050 #define DEFAULT_JAUS_MESSAGE_LENGTH 112
00051 #define JAUS_HEADER_LENGTH 16
00052 #define JAUS_UU_HEADER_LENGTH 32
00053
00054 enum Destination_Node_Class { NO_DESTINATION_NODE_CLASS, INTRANODE_MESSAGE, INTERNODE_MESSAGE };
00055
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00094 enum MESSAGE_CLASS { COMMAND_CLASS, QUERY_CLASS, INFORM_CLASS, EVENT_SETUP_CLASS, EVENT_NOTIFICATON_CLASS,
00095 NODE_MANAGEMENT_CLASS, EXPERIMENTAL_CLASS };
00097 enum JAUS_DATA_FLAG {
00099 ONLY_DATA_PACKET = 0,
00101 FIRST_DATA_PACKET=1,
00103 NORMAL_DATA_PACKET=2,
00105 RETRANSMITTED_DATA_PACKET=4,
00107 LAST_DATA_PACKET=8};
00108
00109 enum JAUS_MESSAGE {
00110 Error_Message=0x00,
00111 Set_Component_Authority_Message=0x01,
00112 Shutdown_Message=0x02,
00113 Standby_Message=0x03,
00114 Resume_Message=0x04,
00115 Reset_Message=0x05,
00116 Set_Emergency_Message=0x06,
00117 Clear_Emergency_Message=0x07,
00118 Create_Service_Connection_Message=0x08,
00119 Confirm_Service_Connection_Message=0x09,
00120 Activate_Service_Connection_Message=0x0A,
00121 Suspend_Service_Connection_Message=0x0B,
00122 Terminate_Service_Connection_Message=0x0C,
00123 Set_Local_Pose_Message=0x403,
00124 Set_Wrench_Effort_Message=0x405,
00125 Set_Discrete_Devices=0x406,
00126 Set_Local_Vector_Message=0x408,
00127 Set_Travel_Speed_Message=0x040A,
00128 Set_Local_Waypoint_Message=0x040D,
00129 Set_Camera_Capabilities_Message=0x805,
00130 Set_Camera_Format_Options_Message=0x806,
00131 Set_Camera_Settings_Message=0x808,
00132 Query_Component_Status_Message=0x2002,
00133 Query_Local_Pose_Message=0x2003,
00134 Query_Time_Message=0x2011,
00135 Query_Heartbeat_Pulse_Message=0x2202,
00136 Query_Platform_Specifications_Message=0x2400,
00137 Query_Platform_Operational_Data_Message=0x2401,
00138 Query_Velocity_State_Message=0x2404,
00139 Query_Local_Vector_Message=0x2408,
00140 Query_Travel_Speed_Message=0x240A,
00141 Query_Waypoint_Count_Message=0x0240B,
00142 Query_Local_Waypoint_Message=0x0240D,
00143 Query_Camera_Count_Message=0x2801,
00144 Query_Relative_Object_Position_Message=0x2802,
00145 Query_Selected_Camera_Message=0x2804,
00146 Query_Camera_Capabilities_Message=0x2805,
00147 Query_Camera_Format_Options_Message=0x2806,
00148 Query_Image_Message=0x2807,
00149 Query_Camera_Settings_Message=0x2808,
00150 Report_Component_Authority=0x4001,
00151 Report_Component_Status_Message=0x4002,
00152 Report_Local_Pose_Message=0x4003,
00153 Report_Time_Message=0x4011,
00154 Report_Heartbeat_Pulse_Message=0x4202,
00155 Report_Platform_Specifications_Message=0x4400,
00156 Report_Platform_Operational_Data_Message=0x4401,
00157 Report_Velocity_State_Message=0x4404,
00158 Report_Local_Vector_Message=0x4408,
00159 Report_Travel_Speed_Message=0x440A,
00160 Report_Waypoint_Count_Message=0x440B,
00161 Report_Local_Waypoint_Message=0x440D,
00162 Report_Camera_Pose_Message=0x4800,
00163 Report_Camera_Count_Message=0x4801,
00164 Report_Relative_Object_Position_Message=0x4802,
00165 Report_Selected_Camera_Message=0x4804,
00166 Report_Camera_Capabilities_Message=0x4805,
00167 Report_Camera_Format_Options_Message=0x4806,
00168 Report_Image_Message=0x4807,
00169 Report_Camera_Settings_Message=0x4808,
00170
00171 Query_Identity_Message =0xD001,
00172 Report_Identity_Message =0xD002,
00173 Query_Component_Message =0xD003,
00174 Set_Platform_Specifications_Message=0xD004,
00175
00176
00177 Report_Component_Message=0xD005,
00178 Query_IS_Message=0xD006,
00179 Report_IS_Message=0xD007,
00180 Set_IS_Message=0xD008,
00181
00182
00183 Query_Error_Message=0xD00B,
00184 Report_Error_Message=0xD00C,
00185 Query_Map_Message=0xD00D,
00186 Report_Map_Message=0xD00E,
00187 Query_Binary_Status_Message=0xD00F,
00188 Set_Binary_Status_Message=0xD010,
00189
00190
00191 Last_Message=0xD00F
00192 };
00193
00194
00195 struct Data_Size_T
00196 {
00197 JAUS_MESSAGE command;
00198 short size;
00199 };
00200
00201
00202
00203
00204
00205
00206
00207
00208 struct authority_code_t
00209 {
00210 uint8 code;
00211 };
00212 struct respond_component_t
00213 {
00214 uint8 subclass;
00215 };
00216 struct set_emergency_t
00217 {
00218 unsigned short code;
00219 };
00220 struct clear_emergency_t
00221 {
00222 unsigned short code;
00223 };
00224
00225
00226 struct status_indicator_t
00227 {
00228 uint16 value;
00229 };
00230
00232
00236 struct camera_settings_t
00237 {
00238 unsigned short horizontal;
00239 unsigned short vertical;
00240 unsigned short shutter;
00241 unsigned short image_control;
00242 };
00243
00244
00245 struct camera_format_t
00246 {
00247 unsigned char audio_format;
00248 unsigned char image_format;
00249 unsigned short _pad;
00250 unsigned int format_option;
00251 };
00252
00253 struct travel_speed_t
00254 {
00255 unsigned short speed;
00256 };
00257 struct IS_t
00258 {
00259 int sid;
00260 int pid;
00261 int value;
00262 short x;
00263 short y;
00264 };
00265
00266 typedef OOMRM_Message system_message_t;
00267
00268 struct system_error_t
00269 {
00270 int error;
00271 int level;
00272 };
00273
00274
00275
00276
00277
00278
00279 struct local_vector_t
00280 {
00281 int speed;
00282 int radians;
00283 int distance;
00284 };
00285
00287
00293
00294 struct component_status_t
00295 {
00296 unsigned int secondary_status_code;
00297 uint8 primary_status_code;
00298 };
00299
00300
00301
00302 struct discrete_device_t
00303 {
00304 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00305 union {
00306 struct {
00307 uint8 df2 : 1;
00308 uint8 df3 : 1;
00309 uint8 df4 : 1;
00310 uint8 df5 : 1;
00311 uint8 R : 4;
00312 } pv;
00313 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00314 union {
00315 struct {
00316 uint8 R : 4;
00317 uint8 df5 : 1;
00318 uint8 df4 : 1;
00319 uint8 df3 : 1;
00320 uint8 df2 : 1;
00321 } pv;
00322 #else
00323 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00324 #endif
00325 uint8 presence_vector;
00326 };
00327 uint8 main_propulsion;
00328 uint8 brake_horn;
00329 uint8 gear;
00330 uint8 transfer_case;
00331 };
00332
00333
00334
00335 struct platform_specification_t
00336 {
00337 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00338 union {
00339 struct {
00340 unsigned int df2 : 1;
00341 unsigned int df3 : 1;
00342 unsigned int df4 : 1;
00343 unsigned int df5 : 1;
00344 unsigned int df6 : 1;
00345 unsigned int df7 : 1;
00346 unsigned int df8 : 1;
00347 unsigned int df9 : 1;
00348 unsigned int df10 : 1;
00349 unsigned int df11 : 1;
00350 unsigned int df12 : 1;
00351 unsigned int df13 : 1;
00352 unsigned int df14 : 1;
00353 unsigned int df15 : 1;
00354 unsigned int df16 : 1;
00355 unsigned int df17 : 1;
00356 unsigned int df18 : 1;
00357 unsigned int df19 : 1;
00358 unsigned int df20 : 1;
00359 unsigned int df21 : 1;
00360 unsigned int df22 : 1;
00361 unsigned int R : 11;
00362 } pv;
00363 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00364 union {
00365 struct {
00366 unsigned int R :11;
00367 unsigned int df22 : 1;
00368 unsigned int df21 : 1;
00369 unsigned int df20 : 1;
00370 unsigned int df19 : 1;
00371 unsigned int df18 : 1;
00372 unsigned int df17 : 1;
00373 unsigned int df16 : 1;
00374 unsigned int df15 : 1;
00375 unsigned int df14 : 1;
00376 unsigned int df13 : 1;
00377 unsigned int df12 : 1;
00378 unsigned int df11 : 1;
00379 unsigned int df10 : 1;
00380 unsigned int df9 : 1;
00381 unsigned int df8 : 1;
00382 unsigned int df7 : 1;
00383 unsigned int df6 : 1;
00384 unsigned int df5 : 1;
00385 unsigned int df4 : 1;
00386 unsigned int df3 : 1;
00387 unsigned int df2 : 1;
00388 } pv;
00389 #else
00390 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00391 #endif
00392 unsigned int presence_vector;
00393 };
00394 char name[15];
00395 uint8 obstacle;
00396 unsigned short wheelbase;
00397 unsigned short Lwheel_diameter;
00398 unsigned short Rwheel_diameter;
00399 unsigned short Lmaximum_velocity;
00400 unsigned short Rmaximum_velocity;
00401 unsigned short Lstall;
00402 unsigned short Rstall;
00403 unsigned short resolution;
00404 unsigned short robot_diameter;
00405
00406
00407
00408
00409
00410
00411
00412
00413
00414
00415
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427 };
00428
00429
00430
00431 struct relative_object_position_t
00432 {
00433 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00434 union {
00435 struct {
00436 unsigned short df3 : 1;
00437 unsigned short df4 : 1;
00438 unsigned short df5 : 1;
00439 unsigned short df6 : 1;
00440 unsigned short df7 : 1;
00441 unsigned short df8 : 1;
00442 unsigned short df9 : 1;
00443 unsigned short df10 : 1;
00444 unsigned short df11 : 1;
00445 unsigned short df12 : 1;
00446 unsigned short R : 6;
00447 } pv;
00448 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00449 union {
00450 struct {
00451 unsigned short R : 6;
00452 unsigned short df12 : 1;
00453 unsigned short df11 : 1;
00454 unsigned short df10 : 1;
00455 unsigned short df9 : 1;
00456 unsigned short df8 : 1;
00457 unsigned short df7 : 1;
00458 unsigned short df6 : 1;
00459 unsigned short df5 : 1;
00460 unsigned short df4 : 1;
00461 unsigned short df3 : 1;
00462 } pv;
00463 #else
00464 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00465 #endif
00466 unsigned short presence_vector;
00467 };
00468 short pad;
00469 unsigned int time_stamp;
00470 unsigned int Range;
00471 unsigned int Range_Error;
00472 int Bearing;
00473 unsigned int Bearing_Error;
00474 int Elevation;
00475 unsigned int Elevation_Error;
00476 uint8 Confidence;
00477 };
00478
00479
00480
00481 struct local_pose_t
00482 {
00483 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00484 union {
00485 struct {
00486 unsigned short df2 : 1;
00487 unsigned short df3 : 1;
00488 unsigned short df4 : 1;
00489 unsigned short df5 : 1;
00490 unsigned short df6 : 1;
00491 unsigned short df7 : 1;
00492 unsigned short df8 : 1;
00493 unsigned short df9 : 1;
00494 unsigned short df10: 1;
00495 unsigned short df11: 1;
00496 unsigned short R : 6;
00497 } pv;
00498 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00499 union {
00500 struct {
00501 unsigned short R : 6;
00502 unsigned short df11: 1;
00503 unsigned short df10: 1;
00504 unsigned short df9 : 1;
00505 unsigned short df8 : 1;
00506 unsigned short df7 : 1;
00507 unsigned short df6 : 1;
00508 unsigned short df5 : 1;
00509 unsigned short df4 : 1;
00510 unsigned short df3 : 1;
00511 unsigned short df2 : 1;
00512 } pv;
00513 #else
00514 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00515 #endif
00516 unsigned short presence_vector;
00517 };
00518 short pad;
00519 int X;
00520 int Y;
00521 int Z;
00522 unsigned int position_RMS;
00523 short roll;
00524 short pitch;
00525 short yaw;
00526 unsigned short attitude_RMS;
00527 unsigned int time_stamp;
00528 unsigned short data_validity;
00529 };
00530
00531
00532
00533 struct velocity_state_t
00534 {
00535 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00536 union {
00537 struct {
00538 unsigned short df2 : 1;
00539 unsigned short df3 : 1;
00540 unsigned short df4 : 1;
00541 unsigned short df5 : 1;
00542 unsigned short df6 : 1;
00543 unsigned short df7 : 1;
00544 unsigned short df8 : 1;
00545 unsigned short df9 : 1;
00546 unsigned short df10: 1;
00547 unsigned short df11: 1;
00548 unsigned short R : 6;
00549 } pv;
00550 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00551 union {
00552 struct {
00553 unsigned short R : 6;
00554 unsigned short df11: 1;
00555 unsigned short df10: 1;
00556 unsigned short df9 : 1;
00557 unsigned short df8 : 1;
00558 unsigned short df7 : 1;
00559 unsigned short df6 : 1;
00560 unsigned short df5 : 1;
00561 unsigned short df4 : 1;
00562 unsigned short df3 : 1;
00563 unsigned short df2 : 1;
00564 } pv;
00565 #else
00566 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00567 #endif
00568 unsigned short presence_vector;
00569 };
00570 short pad;
00571 int X;
00572 int Y;
00573 int Z;
00574 unsigned int velocity_RMS;
00575 short roll;
00576 short pitch;
00577 short yaw;
00578 unsigned short rate_RMS;
00579 unsigned int time_stamp;
00580 unsigned short data_validity;
00581 };
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611
00612
00613
00614
00615
00616
00617
00618
00619
00620
00621
00622
00623
00624 struct set_local_waypoint_t
00625 {
00626 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00627 union {
00628 struct {
00629 uint8 df5 : 1;
00630 uint8 df6 : 1;
00631 uint8 df7 : 1;
00632 uint8 df8 : 1;
00633 uint8 R : 4;
00634 } pv;
00635 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00636 union {
00637 struct {
00638 uint8 R : 4;
00639 uint8 df8 : 1;
00640 uint8 df7 : 1;
00641 uint8 df6 : 1;
00642 uint8 df5 : 1;
00643 } pv;
00644 #else
00645 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00646 #endif
00647 uint8 presence_vector;
00648 };
00649 uint8 pad;
00650 unsigned short number;
00651 int X;
00652 int Y;
00653 int Z;
00654 short roll;
00655 short pitch;
00656 short yaw;
00657 short function;
00658 };
00659 typedef set_local_waypoint_t report_local_waypoint_t;
00660
00661
00662
00663
00664 struct query_local_waypoint_t
00665 {
00666 short number;
00667 };
00668 typedef query_local_waypoint_t waypoint_count_t;
00669
00670
00671
00672 struct set_wrench_effort_t
00673 {
00674 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00675 union {
00676 struct {
00677 unsigned short df2 : 1;
00678 unsigned short df3 : 1;
00679 unsigned short df4 : 1;
00680 unsigned short df5 : 1;
00681 unsigned short df6 : 1;
00682 unsigned short df7 : 1;
00683 unsigned short df8 : 1;
00684 unsigned short df9 : 1;
00685 unsigned short df10: 1;
00686 unsigned short df11: 1;
00687 unsigned short df12: 1;
00688 unsigned short df13: 1;
00689 unsigned short R : 4;
00690 } pv;
00691 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00692 union {
00693 struct {
00694 unsigned short R : 4;
00695 unsigned short df13: 1;
00696 unsigned short df12: 1;
00697 unsigned short df11: 1;
00698 unsigned short df10: 1;
00699 unsigned short df9 : 1;
00700 unsigned short df8 : 1;
00701 unsigned short df7 : 1;
00702 unsigned short df6 : 1;
00703 unsigned short df5 : 1;
00704 unsigned short df4 : 1;
00705 unsigned short df3 : 1;
00706 unsigned short df2 : 1;
00707 } pv;
00708 #else
00709 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00710 #endif
00711 unsigned short presence_vector;
00712 };
00713
00714 short PLE_x;
00715 short PLE_y;
00716 short PLE_z;
00717 short PRE_x;
00718 short PRE_y;
00719 short PRE_z;
00720
00721 uint8 RLE_x;
00722 uint8 RLE_y;
00723 uint8 RLE_z;
00724 uint8 RRE_x;
00725 uint8 RRE_y;
00726 uint8 RRE_z;
00727 };
00728
00729
00733 #define NO_ACKNOWLEDGE 0
00734
00737 #define ACKNOWLEDGE 1
00738
00741 #define ACKNOWLEDGE_NEGATIVE 2
00742
00745 #define ACKNOWLEDGE_OK 3
00746
00747
00754
00756 #if !defined(BIG_ENDIAN) && defined(LITTLE_ENDIAN)
00757 typedef union
00758 {
00759 struct {
00760 volatile word R : 2;
00761 volatile word version : 6;
00762 volatile word ef : 1;
00763 volatile word scf : 1;
00765
00777 volatile word acknak : 2;
00779
00790 volatile word priority : 4;
00791 } bits;
00792 word FULLWORD;
00793 } properties_t;
00794 #elif defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00795
00796 typedef union
00797 {
00798 struct {
00799 volatile word priority : 4;
00800 volatile word acknak : 2;
00801 volatile word scf : 1;
00802 volatile word ef : 1;
00803 volatile word version : 6;
00804 volatile word R : 2;
00805 } bits;
00806 word FULLWORD;
00807 } properties_t;
00808 #else
00809 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00810 #endif
00811
00812
00813 typedef union
00814 {
00815 struct {
00816 uint8 instance;
00817 uint8 component;
00818 uint8 node;
00819 uint8 subsystem;
00820 } bits;
00821 long_word FULLWORD;
00822 } ID_T;
00823
00824
00825
00826 typedef union
00827 {
00828 struct {
00829 #if defined(BIG_ENDIAN) && !defined(LITTLE_ENDIAN)
00830 unsigned short data_size : 12;
00831 unsigned short data_flag : 4;
00832 #elif defined(LITTLE_ENDIAN) && !defined(BIG_ENDIAN)
00833 unsigned short data_flag : 4;
00834 unsigned short data_size : 12;
00835 #else
00836 #error "Either BIG_ENDIAN or LITTLE_ENDIAN must be #defined, but not both."
00837 #endif
00838 } bits;
00839 word FULLWORD;
00840 } data_control_T2;
00841
00842 struct header_t {
00843 properties_t properties;
00844 unsigned short command_code;
00845 ID_T destination;
00846 ID_T source;
00847 data_control_T2 data_control;
00848 unsigned short sequence_number;
00849 };
00850
00851 struct service_connection_t
00852 {
00853 unsigned short command;
00854 unsigned short rate;
00855
00856 ID_T destination;
00857 uint8 id;
00858 uint8 response_code;
00859
00860 };
00861
00862 void hton(header_t* const);
00863 void ntoh(header_t* const);
00864
00865
00866
00867
00868
00869
00870
00871
00872 struct message {
00873 header_t header;
00874 union {
00875 IS_t IS;
00876 system_message_t system_message;
00877 service_connection_t service_connection;
00878 authority_code_t authority_code;
00879 set_emergency_t set_emergency;
00880 set_wrench_effort_t set_wrench_effort;
00881 set_local_waypoint_t set_local_waypoint;
00882 discrete_device_t discrete_device;
00883 local_pose_t local_pose;
00884 velocity_state_t velocity_state;
00885 clear_emergency_t clear_emergency;
00886 query_local_waypoint_t query_local_waypoint;
00887 travel_speed_t travel_speed;
00888 status_indicator_t indicators;
00889 respond_component_t respond_component;
00890 report_local_waypoint_t report_local_waypoint;
00891 local_vector_t local_vector;
00892 relative_object_position_t relative_object_position;
00893 platform_specification_t platform_specification;
00894 component_status_t component_status;
00895 waypoint_count_t waypoint_count;
00896 system_error_t system_error;
00897 camera_settings_t camera_settings;
00898 camera_format_t camera_format;
00899 };
00900 };
00901
00902 extern void jaus_message_send_sci_callback(char c);
00903
00904
00905 #define NO_SERVICE_CONNECTION 0
00906 #define SERVICE_CONNECTION 1
00907
00908
00909 class jaus_message
00910 {
00911 public:
00912 static MESSAGE_CLASS message_class(JAUS_MESSAGE jm);
00913
00914 void service_connection(unsigned short cc, unsigned short irate);
00915 void service_connection_confirm(unsigned short cc, unsigned short irate, uint8 rc, uint8 id);
00916 void service_connection_activate(unsigned short cc, uint8 id);
00917 void local_vector(int speed, FIXED_POINT radians, uint32 distance);
00918 void IS(int isid, int ipid, int ivalue, short x=0, short y=0);
00919 void system_error(int e, int l);
00920 void local_map_spec(unsigned short);
00921 void wrench_effort(short, short, short);
00922 void local_waypoint(short num,int x, int y, short iyaw, short ifn);
00923 void local_waypoint(short num);
00924 void local_pose(int X, int Y, short yaw);
00925 void system_message(OOMRM_Message m);
00926 void camera_settings(unsigned short, unsigned short, unsigned short, unsigned short);
00927 void jaus_message::camera_format(uint32 ioptions);
00928 void travel_speed(unsigned short ispeed);
00929 void status_indicator(uint16 value);
00930 void discrete_device(uint8 horn);
00931 void component_status(uint8 primary, unsigned int secondary);
00932 void relative_object_position(unsigned int itime, unsigned int irange, int ibearing);
00933 void platform_specification(const char* const iname,uint8 obstacle, word wb, word lwd, word rwd, word lmv, word rmv, word lstall, word rstall, word resolution, word rd);
00934 void respond_component(uint8 subclass);
00935
00936 void header(uint8 ipriority, word cc, uint8 ack, JAUS_DATA_FLAG flag,
00937 uint8 Sss, uint8 Snode, uint8 Scomp, uint8 Sinst,
00938 uint8 Dss, uint8 Dnode, uint8 Dcomp, uint8 Dinst, int8 cpu=0);
00939
00940 void iheader(uint8 ipriority, word cc, uint8 ack, JAUS_DATA_FLAG flag,
00941 uint8 Sss, uint8 Snode, uint8 Scomp, uint8 Sinst,
00942 uint8 Dss, uint8 Dnode, uint8 Dcomp, uint8 Dinst, int8 cpu=0);
00943 void receive(void);
00944 message* msg(void);
00945 void send(void);
00946 void inter_send(void);
00947 #ifdef DOS
00948 static const char* log_message(jaus_message &lmsg);
00949 #endif
00950 static void send_simple_message(uint8 ipriority, word cc, uint8 ack, JAUS_DATA_FLAG flag,
00951 uint8 Sss, uint8 Snode, uint8 Scomp, uint8 Sinst,
00952 uint8 Dss, uint8 Dnode, uint8 Dcomp, uint8 Dinst);
00953 message _message;
00954 };
00955
00956 const char* format_message(char idir, char hexbuf[]);
00957
00958 typedef void (*fooxmit)(jaus_message&, uint8);
00959
00960 #endif