gateway_msgs

Summary

gateway_msgs
Version:

0.7.12

Description:

Messages used by the gateway model.

Maintainers:
  • Daniel Stonier <d DOT stonier AT gmail DOT com>
  • Jihoon Lee <jihoonlee DOT in AT gmail DOT com>
  • Piyush Khandelwal <piyushk AT gmail DOT com>
Licenses:
  • BSD
Urls:
Authors:
  • Daniel Stonier
  • Jihoon Lee
  • Piyush Khandelwal
BuildDepends:
BuildtoolDepends:
 
BuildExportDepends:
 
ExecDepends:
Exports:
  • <architecture_independent/>

Types

Message types

gateway_msgs/RemoteGateway
Field:
Constant:
  • WIRED (int8):1
  • WIRELESS (int8):2

##### Gateway information ######

###### Gateway information ######
string name
string ip
#TODO blocking status
bool firewall

# Remote Gateway Statistics

# Constants
int8 WIRED = 1
int8 WIRELESS = 2

#Connection Statistics
ConnectionStatistics conn_stats

###### Public Interface ######

Rule[] public_interface

###### Flipped Interface ######

# Flipped and pulled interfaces would be useful for debugging 
#    https://github.com/robotics-in-concert/rocon_multimaster/issues/84

RemoteRule[] flipped_interface
RemoteRule[] pulled_interface

###### Foreign Interface ######

# Q) Should we show these?
# A) Probably not, in the overall scheme of things, 
#    it doubles up the information from above

# RemoteRule[] flipped_in_connections
# RemoteRule[] pulled_connections
gateway_msgs/RemoteRuleWithStatus
Field:
Constant:
  • UNKNOWN (string):unknown
  • PENDING (string):pending
  • ACCEPTED (string):accepted
  • BLOCKED (string):blocked
  • RESEND (string):resend

The remote rule whose status is being defined here

# The remote rule whose status is being defined here
RemoteRule remote_rule

# Whether the flip is still pending, was accepted 
string UNKNOWN=unknown
string PENDING=pending
string ACCEPTED=accepted
string BLOCKED=blocked
string RESEND=resend
string status
gateway_msgs/RemoteRule
Field:

Definition for a flip. It represents either:

  1. an existing flipped connection (from the local gateway)
  2. a rule that is put on a watchlist

The target recipient of the flip

# Definition for a flip. It represents either:
#
# 1) an existing flipped connection (from the local gateway)
# 2) a rule that is put on a watchlist

# The target recipient of the flip
string gateway

# Connection has the following parameters that need setting
# - name : fully qualified name of the connection (str)
# - type : connection type (str)
#  
# Use one of the types defined in Connection string constants:
#     (publisher, subscriber, service, action_client, action_server)
#
# - node : name of the node it originates from (str)(optional)
#
# Node name is necessary, for instance, if you have multiple subscribers
# publishing to a single topic. Most of the time it is not necessary,
# but in some cases it helps refine the rule. It helps refine the rule.
#
Rule rule
gateway_msgs/ConnectionStatistics
Constant:
  • WIRED (int8):1
  • WIRELESS (int8):2
  • MAX_TTL (int32):86400
Field:
  • gateway_available (bool) –
  • time_since_last_seen (int64) –
  • ping_latency_min (float32) –
  • ping_latency_max (float32) –
  • ping_latency_avg (float32) –
  • ping_latency_mdev (float32) –
  • network_info_available (bool) –
  • network_type (int8) –
  • wireless_bitrate (float32) –
  • wireless_link_quality (int8) –
  • wireless_signal_level (float32) –
  • wireless_noise_level (float32) –

Constants

# Constants
int8 WIRED = 1
int8 WIRELESS = 2
int32 MAX_TTL = 86400

# Gateway ping indicators
bool gateway_available
int64 time_since_last_seen #time in seconds since last ping successful
float32 ping_latency_min
float32 ping_latency_max
float32 ping_latency_avg
float32 ping_latency_mdev #mean absolute deviation

# Gateway network information indicators
bool network_info_available
int8 network_type
float32 wireless_bitrate
int8 wireless_link_quality
float32 wireless_signal_level
float32 wireless_noise_level
gateway_msgs/GatewayInfo
Field:

##### Gateway information ######

Gateway parameters
###### Gateway information ######

# Gateway parameters
string name
bool connected
string ip

# Hub parameters
string[] hub_names
string[] hub_uris

bool firewall

###### Public Interface ######

Rule[] public_watchlist
Rule[] public_interface

###### Flipped Interface ######

RemoteRuleWithStatus[] flipped_connections
RemoteRule[] flip_watchlist
RemoteRule[] flipped_in_connections

###### Pulled Interface ######

RemoteRule[] pull_watchlist
RemoteRule[] pulled_connections
gateway_msgs/ErrorCodes
Constant:
  • SUCCESS (int8):0
  • NO_HUB_CONNECTION (int8):1
  • HUB_CONNECTION_ALREADY_EXISTS (int8):11
  • HUB_CONNECTION_UNRESOLVABLE (int8):12
  • HUB_CONNECTION_BLACKLISTED (int8):13
  • HUB_CONNECTION_FAILED (int8):14
  • HUB_CONNECTION_NOT_IN_NONEMPTY_WHITELIST (int8):15
  • HUB_NAME_NOT_FOUND (int8):16
  • HUB_CONNECTION_LOST (int8):17
  • HUB_UNKNOWN_ERROR (int8):19
  • FLIP_RULE_ALREADY_EXISTS (int8):22
  • FLIP_PATTERN_ALREDY_EXISTS (int8):23
  • FLIP_REMOTE_GATEWAY_FIREWALLING (int8):24
  • ADVERTISEMENT_EXISTS (int8):31
  • ADVERTISEMENT_NOT_FOUND (int8):32
  • UNKNOWN_ADVERTISEMENT_ERROR (int8):39
  • PULL_RULE_ALREADY_EXISTS (int8):41
  • REMOTE_GATEWAY_NOT_VISIBLE (int8):51
  • REMOTE_GATEWAY_SELF_IS_NOT (int8):52
  • REMOTE_GATEWAY_TARGET_HAS_MULTIPLE_MATCHES (int8):53

Error types for the gateway ros api

General

# Error types for the gateway ros api

# General
int8 SUCCESS = 0
int8 NO_HUB_CONNECTION = 1

# Hub
int8 HUB_CONNECTION_ALREADY_EXISTS = 11
int8 HUB_CONNECTION_UNRESOLVABLE = 12
int8 HUB_CONNECTION_BLACKLISTED = 13
int8 HUB_CONNECTION_FAILED = 14
int8 HUB_CONNECTION_NOT_IN_NONEMPTY_WHITELIST = 15
int8 HUB_NAME_NOT_FOUND = 16
int8 HUB_CONNECTION_LOST = 17
int8 HUB_UNKNOWN_ERROR = 19

# Flipping
int8 FLIP_RULE_ALREADY_EXISTS = 22
int8 FLIP_PATTERN_ALREDY_EXISTS = 23
int8 FLIP_REMOTE_GATEWAY_FIREWALLING = 24

# Advertise
int8 ADVERTISEMENT_EXISTS = 31
int8 ADVERTISEMENT_NOT_FOUND = 32
int8 UNKNOWN_ADVERTISEMENT_ERROR = 39

# Pulling
int8 PULL_RULE_ALREADY_EXISTS = 41

# Remotes
int8 REMOTE_GATEWAY_NOT_VISIBLE = 51
int8 REMOTE_GATEWAY_SELF_IS_NOT = 52
int8 REMOTE_GATEWAY_TARGET_HAS_MULTIPLE_MATCHES = 53
gateway_msgs/Rule
Field:
  • type (string) –
  • name (string) –
  • node (string) –

Standard gateway connection rule

type of connection (from gateway_msgs.msg.Connection)

# Standard gateway connection rule

# type of connection (from gateway_msgs.msg.Connection)
string type

# this is the topic/service name or the action base name (a regex is supported)
string name 

# (optional) an optional node name can be provided. if node name is not provided
# then all nodes are matched (also supports regex)
string node
gateway_msgs/ConnectionType
Constant:
  • PUBLISHER (string):publisher
  • SUBSCRIBER (string):subscriber
  • SERVICE (string):service
  • ACTION_CLIENT (string):action_client
  • ACTION_SERVER (string):action_server
  • INVALID (string):invalid

A connection can be 1 of 5 types

# A connection can be 1 of 5 types
string PUBLISHER = publisher
string SUBSCRIBER = subscriber
string SERVICE = service
string ACTION_CLIENT = action_client
string ACTION_SERVER = action_server
string INVALID = invalid

Service types

gateway_msgs/SetWatcherPeriod
Field (Request):
 
  • period (float32) –
Field (Response):
 
  • last_period (float32) –

set the watcher loop period (float value in secs). a negative value or 0.0 returns it to the default set by param

# set the watcher loop period (float value in secs).
# a negative value or 0.0 returns it to the default set by param
float32 period
---
# return the previous setting used for this variable
float32 last_period
gateway_msgs/RemoteAll
Field (Request):
 
Field (Response):
 
  • result (int8) –
  • error_message (string) –

Flips all except a blacklist to the specified target

The target recipient of the flip

# Flips all except a blacklist to the specified target

# The target recipient of the flip
string gateway

# list of connections to exclude, this will be added to the default blacklist
Rule[] blacklist

# if cancel is set, stops flipping all connections
bool cancel

---

# Return a verbose error string to help with debugging if success fails.
# Strings defined in gateway_comms.msg.Result
int8 result
string error_message
gateway_msgs/Remote
Field (Request):
 
Field (Response):
 
  • result (int8) –
  • error_message (string) –

Rules list specifying interactions with a remote gateway. Depending on the service, this gets used for either flips or pulls.

List of flip/pull rules

# Rules list specifying interactions with a remote gateway.
# Depending on the service, this gets used for either flips or pulls.

# List of flip/pull rules
RemoteRule[] remotes

# if true, attempt to cancel an existing flip rather than creating it
bool cancel

---

# Return a verbose error string to help with debugging if success fails.
# Strings defined in gateway_msgs.ErrorCodes
int8 result
string error_message
gateway_msgs/AdvertiseAll
Field (Request):
 
Field (Response):
 

if cancel is set, stops advertising all connections

# if cancel is set, stops advertising all connections
bool cancel
Rule[] blacklist

---

# Return a verbose error string to help with debugging if success fails.
# Strings defined in gateway_comms.msg.Result
int8 result
string error_message

Rule[] blacklist
gateway_msgs/ConnectHub
Field (Request):
 
  • uri (string) –
Field (Response):
 
  • result (int8) –
  • error_message (string) –

Use to make connections to the hub.

# Use to make connections to the hub.

string uri
---
# Return a verbose error string to help with debugging if success fails.
# Strings defined in gateway_comms.msg.Result
int8 result
string error_message
gateway_msgs/RemoteGatewayInfo
Field (Request):
 
  • gateways[] (string) –
Field (Response):
 

optional list of gateway names to filter the returned list supplying this list empty returns information for all the gateways

# optional list of gateway names to filter the returned list
# supplying this list empty returns information for all the gateways
string[] gateways
---
RemoteGateway[] gateways
gateway_msgs/Advertise
Field (Request):
 
Field (Response):
 

if cancel is set, removes the list from the public interface

# if cancel is set, removes the list from the public interface
bool cancel
Rule[] rules

---

# Return a verbose error string to help with debugging if success fails.
# Strings defined in gateway_comms.msg.Result
int8 result
string error_message

Rule[] watchlist