Note: Goby version 1 (shown here) is now considered obsolete. Please use version 2 for new projects, and consider upgrading old projects.

Goby Underwater Autonomy Project  Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
protobuf/modem_message.proto
00001 import "goby/protobuf/queue.proto";
00002 // TODO(tes) consider using extensions to handle different modem characteristics
00003 
00004 package goby.acomms.protobuf;
00005 
00006 // shared for all messages
00007 message ModemMsgBase
00008 {
00009   optional int32 src = 1 [default = 0]; //  0 (BROADCAST), 1-31, 
00010   optional int32 dest = 2 [default = 0]; //  0 (BROADCAST), 1-31, -1 (QUERY_DESTINATION_ID)
00011   optional string time = 3; // UTC time output from operator<< of boost::posix_time::ptime: e.g. "2002-Jan-01 14:23:11"
00012   enum TimeSource { MODEM_TIME = 1; GOBY_TIME = 2; } 
00013   optional TimeSource time_source = 5 [default = GOBY_TIME]; // source of the timestamp given  
00014   optional uint32 rate = 6 [default = 0]; // 0 (lowest) - 5 (highest)
00015   optional string raw = 7; // "$CARXD,..."
00016   optional string description = 8; // "Incoming hexadecimal data"
00017 }
00018 
00019 // data 
00020 message ModemDataTransmission
00021 {
00022   optional ModemMsgBase base = 1;
00023   optional bool ack_requested = 2 [default = true]; // acoustic acknowledgment requested
00024   //  optional uint32 max_bytes = 3;
00025   optional bytes data = 4; // data (encoded as a byte string - eight bits to the character)
00026   optional uint32 frame = 5 [default = 0];  // frame number if the modem supports multiple frames per packet
00027   optional QueueKey queue_key = 6;
00028   // TODO(tes) put DCCL header in here if DCCL
00029 
00030   extensions 1000 to max;
00031 }
00032 
00033 message ModemDataAck
00034 {
00035   optional ModemMsgBase base = 1;
00036   optional uint32 frame = 2 [default = 0]; // provided by libmodemdriver
00037   optional ModemDataTransmission orig_msg = 3; // will be provided by libqueue
00038 }
00039 
00040 message ModemDataExpire
00041 {
00042   optional ModemDataTransmission orig_msg = 1; // the message that just expired
00043 }
00044 
00045 message ModemDataRequest
00046 {
00047   optional ModemMsgBase base = 1;
00048   optional uint32 max_bytes = 2; // omitted means no maximum
00049   optional uint32 frame = 3 [default = 0]; 
00050  }
00051 
00052 message ModemDataInit
00053 {
00054   optional ModemMsgBase base = 1;
00055   optional uint32 num_frames = 2 [default = 1];
00056 }
00057 
00058 // ranging
00059 enum RangingType
00060 {
00061 
00062   // modem 1 interrogates modem 2; modem 2 replies and modem 1 computes one way travel time
00063   MODEM_TWO_WAY_PING = 1; 
00064 
00065   // modems 1 and 2 have synchronous clocks. modem 2 sends to modem 1 at agreed upon time
00066   // and modem 1 computes one way travel time
00067   MODEM_ONE_WAY_SYNCHRONOUS = 2;
00068 
00069   // modem 1 pings a REMUS network of long baseline (LBL) beacons
00070   REMUS_LBL_RANGING = 3;
00071 }
00072 
00073 message ModemRangingReply
00074 {
00075   optional ModemMsgBase base = 1;
00076   // seconds
00077   repeated double one_way_travel_time = 2;  
00078   optional RangingType type = 3;
00079 }
00080 
00081 message ModemRangingRequest
00082 {
00083   optional ModemMsgBase base = 1;
00084   optional RangingType type = 2;
00085 
00086   // meters, not used if type == MODEM_RANGING
00087   optional uint32 max_range = 3 [default = 1000]; 
00088   
00089   // LSB->MSB is LBL beacons 1,2,3,... true is enabled, false is disabled
00090   // enable four beacons is b1111 == d15 
00091   optional uint32 enable_beacons = 4 [default = 15];
00092 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends