// node template

#ifndef nodeTemplate_H
#define nodeTemplate_H
// nodeTemplate is a template for building ROS nodes with wxWidgets

#include <wx/wx.h>
#include <ros/node.h>

// include node-specific header files here
#include "wxWidgetsNodeTemplate/ROS_Node_Template.h" //This is our autogenerated msg
#include "serverNode/nodeTemplateServer.h" // and our autogenerated srv

using namespace ros;

class nodeTemplate
{
private:
wxTextCtrl *m_pTextBox;
Node *m_pNode;
wxString m_AdvertiseNodeBusOut, m_SubscribeMonitorNodeBus, m_AdvertiseServiceDataBus;
void initNode();

// node-specific service and subscribe callbacks
wxWidgetsNodeTemplate::ROS_Node_Template monitorNodeBus;
wxWidgetsNodeTemplate::ROS_Node_Template nodeBusOut;

void monitorNodeBusCallback();
bool serviceTemplateCallback(serverNode::nodeTemplateServer::Request &req,
serverNode::nodeTemplateServer::Response &res );

public:
nodeTemplate(wxTextCtrl *TextBox);
virtual ~nodeTemplate();

// node-specific publish method
void Publish();

// node-specfic routines and variables
private:
// node specific values
wxString m_MessageIn;
uint8_t m_Value8;
uint16_t m_Value16;
uint32_t m_Value32;
uint64_t m_Value64;

public:

// node-specific methods
void setValuesMonitorNodeBus( wxString messageIn, uint8_t Value8, uint16_t Value16, uint32_t Value32, uint64_t Value64);
void getValuesNodeBusOut( wxString *pMessageOut, uint8_t *pValue8, uint16_t *pValue16, uint32_t *pValue32, uint64_t *pValue64);

};

#endif //nodeTemplate_H