outgoing_message.py
Go to the documentation of this file.
1 from rosbridge_library.internal.message_conversion import extract_values as extract_json_values
2 from rosbridge_library.internal.cbor_conversion import extract_cbor_values
3 
4 
6  """A message wrapper for caching encoding operations."""
7  def __init__(self, message):
8  self._message = message
9  self._json_values = None
10  self._cbor_values = None
11 
12  @property
13  def message(self):
14  return self._message
15 
16  def get_json_values(self):
17  if self._json_values is None:
18  self._json_values = extract_json_values(self._message)
19  return self._json_values
20 
21  def get_cbor_values(self):
22  if self._cbor_values is None:
24  return self._cbor_values


rosbridge_library
Author(s): Jonathan Mace
autogenerated on Wed Jun 3 2020 03:55:14