2
modem_id_lookup_path = modem_id_lookup.txt
3
4
ProcessConfig = pAcommsHandler
5
// available to all moos processes.
9
// verbose, terse, quiet
12
//////////////////////
13
// MAC (must be using internal driver)
14
//////////////////////
15
mac = slotted // or polled or none
18
slot_time = 15 // seconds for the width of each slot
19
rate = 0 // modem rate (0, 2, 3, 5 or auto [not implemented])
22
// initializer.string = ACOMMS_POLLER_UPDATE = update_type=ADD,poll_type1=data,poll_from_id1=1,poll_to_id1=0,poll_rate1=0,poll_wait1=15
23
// initializer.string = ACOMMS_POLLER_UPDATE = update_type=ADD,poll_type1=data,poll_from_id1=2,poll_to_id1=0,poll_rate1=0,poll_wait1=15
25
//////////////////////
26
// time sync (not implemented)
27
//////////////////////
28
// time_sync = true // do automatic "ntp-like" sync of clocks - requires permission to call settimeofday()
29
// analogous to ntp numbers
30
// set to none or empty if this machine does not have any external clock sync
31
// eventually this will be incorporated with ntp
32
// low stratum numbers will be used to send clock sync messages
35
//////////////////////
36
// Driver configuration
37
//////////////////////
38
serial_port = /dev/ttyS0
41
// set all CFG values to factory defaults at the start before sending our CFG values
42
// true is the default
44
cfg_to_defaults = true
51
//////////////////////
52
// Queuing configuration
53
//////////////////////
55
// send = DestID, VarName, VariableID, [Ack], [BlackoutTime], [MaxQueue], [NewestFirst], [Priority], [Priority Time Constant]
56
// defaults are send = mandatory,mandatory,mandatory,0,0,0,0,0,0,(blank)
57
// for all outgoing messages
58
// VarName - local variable to subscribe to
59
// VariableID - 4 bit number (0 - 15) to allow the receiver to publish the variable in a specific remote variable (this number must match receiver's 'receive'
61
// Ack - 0: no ack, 1: request acknowledgement (if no ack received, message will be queued to send again)
62
// BlackoutTime - do not send from this variable more than once per this number of seconds (default 0).
63
// MaxQueue - max number of messages in the queue before no more are added (newest first deletes oldest)
64
// NewestFirst - 0 (default): FIFO stack (messages sent in order received), 1: FILO stack (newest messages sent first)
65
// Priority - highest priority number sent first (default 0). equal priority messages interleaved in queue.
66
// Dynamic Priority Time Constant:
67
// p = p' * exp(t-t'/T) where
68
// p = calculated priority (used when figuring messages)
69
// p' = priority set in previous parameter
72
// T = dynamic priority time constant (what you're setting here)
73
// 0 is a special case that means do not use dynamic priorities (T = infinity)
82
// [Priority Time Constant]
83
send = OUT_CTD_HEX_30B, 1, 0, 0, 100, 1, 0.3, 0
85
// send_CCL all parameters same EXCEPT variable ID should be the CCL header (in hex)
86
send_CCL = OUT_DEPLOY_HEX_32B, 1a, 1, 0, 1, 1, 10, 120
87
send_CCL = OUT_PROSECUTE_HEX_32B, 1a, 1, 0, 1, 1, 10, 120
89
send_CCL = OUT_STATUS_HEX_32B, 1b, 0, 0, 1, 1, 1, 120
90
send_CCL = OUT_CONTACT_HEX_32B, 1b, 0, 0, 1, 1, 2, 120
91
send_CCL = OUT_TRACK_HEX_32B, 1b, 0, 0, 1, 1, 4, 120
93
// receive = VarName, VariableID
94
receive = IN_CTD_HEX_30B, 1
96
// receive = VarName, CCL ID
97
receive_CCL = IN_PLUS_COMMANDS_HEX_32B, 1a
98
receive_CCL = IN_PLUS_MESSAGES_HEX_32B, 1b
100
//////////////////////
101
// DCCL Codec configuration
102
//////////////////////
104
// or you could use pGeneralCodec if you set these to "false"
105
// default (for legacy support) is false for both
109
//////////////////////
110
// XML files (used for both Queuing and DCCL encoding)
111
//////////////////////
113
message_file = ../../../data/acomms/acoustic_moospoke.xml
115
// manipulators go between "message_file = " and "somexml.xml". comma separate multiple manipulators
116
// allowed manipulators:
117
// no_encode - do not encode this message
118
// no_decode - do not decode this message
119
// no_queue - do not queue this message
120
// loopback - decode this message internally immediately following encode (used to command youself)
121
// on_demand - encode immediately upon a data request command (use for time sensitive messages like STATUS)
122
// tcp_share - send any messages received of this type onto the given clients
123
// encodes on demand, always assuming one is available in the queue
124
message_file = on_demand = ../../../data/acomms/simple_status.xml
125
message_file = loopback,no_queue = ../../../data/acomms/simple_deploy.xml
12
//////////////////////
13
// pAcommsHandler Config
14
//////////////////////
16
\begin{pAcommsHandler_config}
128
//////////////////////
130
//////////////////////
131
tcp_share_enable = true
132
tcp_share_port = 11000
133
tcp_share_to_ip = 192.168.1.12:12045
134
tcp_share_to_ip = 192.168.1.15
136
//////////////////////
138
//////////////////////
140
// initialize variable at the top of the moos file
141
global_initializer.double = LAT_ORIGIN = LatOrigin
142
global_initializer.double = LONG_ORIGIN = LongOrigin
143
global_initializer.string = MODEM_ID_PATH = modem_id_lookup_path
145
// initialize variable here
146
initializer.string = VEHICLE_NAME = unicorn
147
initializer.string = VEHICLE_TYPE = auv
22
\end{pAcommsHandler_config}