Go to the documentation of this file.
25 #ifndef GOBY_MOOS_TRANSITIONAL_MESSAGE_VAR_H
26 #define GOBY_MOOS_TRANSITIONAL_MESSAGE_VAR_H
39 #include <boost/lexical_cast.hpp>
48 namespace transitional
52 class DCCLAlgorithmPerformer;
70 void set_source_key(std::string source_key) { source_key_ = std::move(source_key); }
72 void set_algorithms(
const std::vector<std::string>& algorithm) { algorithms_ = algorithm; }
75 virtual void set_max(
const std::string& ) { bad_overload(
"set_max()"); }
76 virtual void set_min(
const std::string& ) { bad_overload(
"set_min()"); }
77 virtual void set_precision(
const std::string& ) { bad_overload(
"set_precision()"); }
78 virtual void set_max_length(
const std::string& ) { bad_overload(
"set_max_length()"); }
79 virtual void set_num_bytes(
const std::string& ) { bad_overload(
"set_num_bytes()"); }
82 bad_overload(
"set_static_val()");
84 virtual void add_enum(std::string ) { bad_overload(
"add_enum()"); }
85 virtual void set_max_delta(
const std::string& ) { bad_overload(
"set_max_delta()"); }
93 virtual double max()
const
95 bad_overload(
"max()");
98 virtual double min()
const
100 bad_overload(
"min()");
105 bad_overload(
"precision()");
110 bad_overload(
"max_length()");
115 bad_overload(
"num_bytes()");
120 bad_overload(
"static_val()");
123 virtual std::vector<std::string>*
enums()
125 bad_overload(
"enums()");
138 const std::vector<std::string>&
algorithms()
const {
return algorithms_; }
145 void set_defaults(std::map<std::string, std::vector<DCCLMessageVal> >& vals,
unsigned modem_id,
158 bad_overload(
"set_defaults_specific()");
162 void bad_overload(
const std::string& s)
const
165 std::string(s +
" not supported by this DCCLMessageVar: " +
name() +
" (" +
179 std::string source_key_;
180 std::vector<std::string> algorithms_;
virtual void set_static_val(const std::string &)
virtual std::string static_val() const
virtual void set_num_bytes(const std::string &)
The global namespace for the Goby project.
virtual int precision() const
virtual void initialize_specific()=0
virtual void add_enum(std::string)
void set_name(std::string name)
virtual void set_max_delta(const std::string &)
void set_defaults(std::map< std::string, std::vector< DCCLMessageVal > > &vals, unsigned modem_id, unsigned id)
virtual double min() const
DCCLType
Enumeration of DCCL types used for sending messages. dccl_enum and dccl_string primarily map to cpp_s...
virtual void set_precision(const std::string &)
void set_array_length(unsigned u)
virtual void write_schema_to_dccl2(std::ofstream *proto_file, int sequence_number)
virtual unsigned max_length() const
unsigned array_length() const
virtual DCCLType type() const =0
void set_algorithms(const std::vector< std::string > &algorithm)
extern ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions, ::google::protobuf::internal::MessageTypeTraits< ::goby::GobyMessageOptions >, 11, false > msg
int sequence_number() const
const std::vector< std::string > & algorithms() const
virtual void set_max(const std::string &)
void initialize(const DCCLMessage &msg)
virtual std::vector< std::string > * enums()
void set_array_length(const std::string &s)
virtual unsigned num_bytes() const
std::string type_to_string(DCCLType type)
void set_source_var(std::string source_var)
virtual void set_max_length(const std::string &)
virtual double max() const
void set_source_set(bool source_set)
void set_source_key(std::string source_key)
virtual void set_defaults_specific(DCCLMessageVal &, unsigned, unsigned)
dccl::Exception DCCLException
virtual void set_min(const std::string &)
std::string source_var() const
virtual std::string additional_option_extensions()