ctnd. work on remote client access implementation

This commit is contained in:
Matej Sekoranja
2011-01-04 12:58:51 +01:00
parent a2798bb3b7
commit b6d9221a47
5 changed files with 544 additions and 134 deletions

View File

@@ -520,6 +520,26 @@ class MockChannel : public Channel {
// TODO
return 0;
}
virtual void printInfo() {
String info;
printInfo(&info);
std::cout << info.c_str() << std::endl;
}
virtual void printInfo(epics::pvData::StringBuilder out) {
//std::ostringstream ostr;
//static String emptyString;
out->append( "CHANNEL : "); out->append(m_name);
out->append("\nSTATE : "); out->append(ConnectionStateNames[getConnectionState()]);
if (isConnected())
{
out->append("\nADDRESS : "); out->append(getRemoteAddress());
//out->append("\nRIGHTS : "); out->append(getAccessRights());
}
out->append("\n");
}
};
class MockChannelProvider;
@@ -905,7 +925,7 @@ int main(int argc,char *argv[])
context->getProvider()->createChannel("test", &channelRequester, ChannelProvider::PRIORITY_DEFAULT, "over the rainbow");
Channel* channel = context->getProvider()->createChannel("test", &channelRequester);
std::cout << channel->getChannelName() << std::endl;
channel->printInfo();
GetFieldRequesterImpl getFieldRequesterImpl;
channel->getField(&getFieldRequesterImpl, "timeStamp.secondsPastEpoch");