00001 // Copyright (C) 2008 Christopher Mire 00002 00003 #ifndef SICK_MSG_0xA0_H 00004 #define SICK_MSG_0xA0_H 00005 00006 #include "sick_msg.H" 00007 00008 namespace sick 00009 { 00010 // Reponse from 20h - switch operating mode 00011 class msg_0xA0_t : public msg_t 00012 { 00013 protected: 00014 static unsigned const SUCCESS_OFFSET = 5; 00015 00016 public: 00017 msg_0xA0_t (); 00018 msg_0xA0_t (msg_t const *msg) : msg_t (msg) {} 00019 00020 enum success_t 00021 { 00022 SUCCESS = 0, 00023 WRONG_PASSWORD = 1, 00024 FAULT = 2, 00025 }; 00026 00027 bool success (void) const 00028 { 00029 return (m_data[SUCCESS_OFFSET] == SUCCESS); 00030 } 00031 }; 00032 }; 00033 00034 #endif