SickLMS1xxMessage.hh
Go to the documentation of this file.
1 
16 #ifndef SICK_LMS_1XX_MESSAGE_HH
17 #define SICK_LMS_1XX_MESSAGE_HH
18 
19 /* Macros */
20 #define SICK_LMS_1XX_MSG_HEADER_LEN (1)
21 #define SICK_LMS_1XX_MSG_PAYLOAD_MAX_LEN (30000)
22 #define SICK_LMS_1XX_MSG_TRAILER_LEN (1)
23 
24 /* Definition dependencies */
25 #include <string.h>
26 #include <arpa/inet.h>
27 #include "SickMessage.hh"
28 #include "SickException.hh"
29 
30 /* Associate the namespace */
31 namespace SickToolbox {
32 
37  class SickLMS1xxMessage : public SickMessage< SICK_LMS_1XX_MSG_HEADER_LEN, SICK_LMS_1XX_MSG_PAYLOAD_MAX_LEN, SICK_LMS_1XX_MSG_TRAILER_LEN > {
38 
39  public:
40 
43 
45  SickLMS1xxMessage( const uint8_t * const payload_buffer, const unsigned int payload_length );
46 
48  SickLMS1xxMessage( const uint8_t * const message_buffer );
49 
51  void BuildMessage( const uint8_t * const payload_buffer, const unsigned int payload_length );
52 
54  void ParseMessage( const uint8_t * const message_buffer ) throw ( SickIOException );
55 
57  std::string GetCommandType( ) const { return _command_type; }
58 
60  std::string GetCommand( ) const { return _command; }
61 
63  void Clear( );
64 
66  void Print( ) const;
67 
70 
71  private:
72 
74  std::string _command_type;
75 
77  std::string _command;
78 
79  };
80 
81 } /* namespace SickToolbox */
82 
83 #endif /* SICK_LMS_1XX_MESSAGE_HH */
void ParseMessage(const uint8_t *const message_buffer)
Parses a sequence of bytes into a SickLMS1xxMessage object.
void BuildMessage(const uint8_t *const payload_buffer, const unsigned int payload_length)
Constructs a well-formed Sick LMS 1xx message.
Contains some simple exception classes.
std::string GetCommandType() const
Defines the abstract parent class for all Sick messages.
Provides an abstract parent for all Sick messages.
Definition: SickMessage.hh:32
Encapsulates the Sick LIDAR Matlab/C++ toolbox.
Definition: SickLD.cc:44
void Clear()
Reset all internal fields and buffers associated with the object.
Thrown instance where the driver can&#39;t read,write,drain,flush,... the buffers.
SickLMS1xxMessage()
A default constructor.
void Print() const
Print the message contents.
A class to represent all messages sent to and from the Sick LMS 1xx unit.


sicktoolbox
Author(s): Jason Derenick , Thomas Miller
autogenerated on Tue Sep 10 2019 03:37:34