00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef DIALNODE_H
00016 #define DIALNODE_H
00017
00018 #include "pandabase.h"
00019
00020 #include "clientBase.h"
00021 #include "clientDialDevice.h"
00022 #include "dataNode.h"
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039 class EXPCL_PANDA_DEVICE DialNode : public DataNode {
00040 PUBLISHED:
00041 DialNode(ClientBase *client, const string &device_name);
00042 virtual ~DialNode();
00043
00044 INLINE bool is_valid() const;
00045
00046 INLINE int get_num_dials() const;
00047
00048 INLINE double read_dial(int index);
00049 INLINE bool is_dial_known(int index) const;
00050
00051 private:
00052 PT(ClientDialDevice) _dial;
00053
00054 protected:
00055
00056 virtual void do_transmit_data(DataGraphTraverser *trav,
00057 const DataNodeTransmit &input,
00058 DataNodeTransmit &output);
00059
00060 private:
00061
00062
00063 public:
00064 static TypeHandle get_class_type() {
00065 return _type_handle;
00066 }
00067 static void init_type() {
00068 DataNode::init_type();
00069 register_type(_type_handle, "DialNode",
00070 DataNode::get_class_type());
00071 }
00072 virtual TypeHandle get_type() const {
00073 return get_class_type();
00074 }
00075 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00076
00077 private:
00078 static TypeHandle _type_handle;
00079 };
00080
00081 #include "dialNode.I"
00082
00083 #endif