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/amac.proto
00001 import "goby/protobuf/option_extensions.proto";
00002 
00003 package goby.acomms.protobuf;
00004 
00005 enum SlotType
00006 {
00007   SLOT_DATA = 1;
00008   SLOT_PING = 2;
00009   SLOT_REMUS_LBL = 3;
00010 };
00011 
00012 message Slot
00013 {
00014   required int32 src = 1 [(description)="source modem id for this transmission (initiating platform)", (example)="1"];
00015   optional int32 dest = 2 [ default = -1, (description)="destination modem id for this transmission; 0 means broadcast, -1 means query the queuing layer for next available message"];
00016   optional uint32 rate = 3 [ default = 0, (description)="bit rate (integer from 0-5, 0 is slowest)" ];
00017   required SlotType type = 4 [ default = SLOT_DATA, (description)="type of message to initiate in this slot"] ;
00018   optional uint32 slot_seconds = 5 [(description)="length of this slot in seconds", (example)="15"];
00019 
00020   // "2011-Jan-22 12:08:06.887950"
00021   // which is produced by operator<< for boost::posix_time::ptime
00022   optional string last_heard_time = 6 [(description)="used internally, no need to configure manually"]; 
00023 }
00024 
00025 enum MACType {
00026   MAC_NONE = 1; // no MAC 
00027   MAC_FIXED_DECENTRALIZED = 2; // decentralized time division multiple access
00028   MAC_AUTO_DECENTRALIZED = 3; // decentralized time division multiple access with peer discovery
00029   MAC_POLLED = 4; // centralized polling
00030 };
00031 
00032 message MACConfig
00033 {
00034   optional int32 modem_id = 1 [(description)="Unique number 1-31 to identify this node",
00035                                (example)="1"];
00036   
00037   optional MACType type = 2 [default = MAC_NONE,
00038                              (description)="The type of TDMA MAC scheme to use"];
00039 
00040   // only required for MAC_FIXED_DECENTRALIZED and MAC_POLLED, specify templates for MAC_AUTO_DECENTRALIZED below
00041   repeated Slot slot = 3 [(description)="Configure a slot in the communications cycle. Slots are run in the order they are declared. Omit for MAC_AUTO_DECENTRALIZED."];
00042   
00043   // only required for MAC_AUTO_DECENTRALIZED - specify these in `cycle` (above) for other types
00044   optional uint32 rate = 4 [default = 0,
00045                             (description)="Set rate to use for MAC_AUTO_DECENTALIZED. Use `slot` for other MACTypes"];
00046   optional uint32 slot_seconds = 5 [default = 15,
00047                                     (description)="Set duration of the slot for MAC_AUTO_DECENTRALIZED. Use `slot` for other MACTypes"];
00048   optional uint32 expire_cycles = 6 [default = 30,
00049                                      (description)="Set number of quiet cycles for discarding a node from the cycle for MAC_AUTO_DECENTRALIZED."];
00050   
00051 }
00052 
00053 
00054 message MACUpdate
00055 {
00056   enum UpdateType
00057   {
00058     ADD = 1;
00059     REMOVE = 2;
00060     REPLACE = 3;
00061   }
00062 
00063   required int32 dest = 1; // modem_id that this update is for
00064   optional UpdateType update_type = 2 [default = REPLACE];
00065   repeated Slot slot = 3;
00066 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends