Update of /cvsroot/playerstage/code/player/server/drivers/mcom
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30199/server/drivers/mcom
Modified Files:
lifomcom.cc
Log Message:
overhaul of the player interface definitions
interfaces are now defined with a very light weight IDL allowing them to be
edited in a single file
some subtype names were also modified as a side effect, making them more
consistent globally
Index: lifomcom.cc
===================================================================
RCS file: /cvsroot/playerstage/code/player/server/drivers/mcom/lifomcom.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** lifomcom.cc 3 May 2006 13:06:44 -0000 1.14
--- lifomcom.cc 20 Aug 2007 06:37:27 -0000 1.15
***************
*** 60,68 ****
@par Configuration requests
! - PLAYER_MCOM_PUSH_REQ
! - PLAYER_MCOM_POP_REQ
! - PLAYER_MCOM_READ_REQ
! - PLAYER_MCOM_CLEAR_REQ
! - PLAYER_MCOM_SET_CAPACITY_REQ
@par Configuration file options
--- 60,68 ----
@par Configuration requests
! - PLAYER_MCOM_REQ_PUSH
! - PLAYER_MCOM_REQ_POP
! - PLAYER_MCOM_REQ_READ
! - PLAYER_MCOM_REQ_CLEAR
! - PLAYER_MCOM_REQ_SET_CAPACITY
@par Configuration file options
***************
*** 133,137 ****
cfg->type = ntohs(cfg->type);
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_PUSH, device_id))
{
Data.Push(cfg->data, cfg->type, cfg->channel);
--- 133,137 ----
cfg->type = ntohs(cfg->type);
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_REQ_PUSH, device_id))
{
Data.Push(cfg->data, cfg->type, cfg->channel);
***************
*** 140,144 ****
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_POP, device_id))
{
assert(*resp_data >= sizeof(player_mcom_return_t));
--- 140,144 ----
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_REQ_POP, device_id))
{
assert(*resp_data >= sizeof(player_mcom_return_t));
***************
*** 159,163 ****
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_READ, device_id))
{
assert(*resp_data >= sizeof(player_mcom_return_t));
--- 159,163 ----
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_REQ_READ, device_id))
{
assert(*resp_data >= sizeof(player_mcom_return_t));
***************
*** 180,184 ****
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_CLEAR, device_id))
{
Data.Clear(cfg->type, cfg->channel);
--- 180,184 ----
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_REQ_CLEAR, device_id))
{
Data.Clear(cfg->type, cfg->channel);
***************
*** 187,191 ****
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_SET_CAPACITY,
device_id))
{
Data.SetCapacity(cfg->type, cfg->channel, cfg->data.data[0]);
--- 187,191 ----
}
! if (MatchMessage(hdr, PLAYER_MSGTYPE_REQ, PLAYER_MCOM_REQ_SET_CAPACITY,
device_id))
{
Data.SetCapacity(cfg->type, cfg->channel, cfg->data.data[0]);
***************
*** 210,218 ****
// arguments to PutReply are: (void* client, ushort replytype, struct
timeval* ts, void* data, size_t datalen)
switch(cfg->command) {
! case PLAYER_MCOM_PUSH_REQ:
Data.Push(cfg->data, cfg->type, cfg->channel);
PutReply(client, PLAYER_MSGTYPE_RESP_ACK, NULL);
return 0;
! case PLAYER_MCOM_POP_REQ:
player_mcom_return_t ret;
ret.data = Data.Pop(cfg->type, cfg->channel);
--- 210,218 ----
// arguments to PutReply are: (void* client, ushort replytype, struct
timeval* ts, void* data, size_t datalen)
switch(cfg->command) {
! case PLAYER_MCOM_REQ_PUSH:
Data.Push(cfg->data, cfg->type, cfg->channel);
PutReply(client, PLAYER_MSGTYPE_RESP_ACK, NULL);
return 0;
! case PLAYER_MCOM_REQ_POP:
player_mcom_return_t ret;
ret.data = Data.Pop(cfg->type, cfg->channel);
***************
*** 227,231 ****
}
break;
! case PLAYER_MCOM_READ_REQ:
ret.data = Data.Read(cfg->type, cfg->channel);
if(ret.data.full) {
--- 227,231 ----
}
break;
! case PLAYER_MCOM_REQ_READ:
ret.data = Data.Read(cfg->type, cfg->channel);
if(ret.data.full) {
***************
*** 241,250 ****
}
break;
! case PLAYER_MCOM_CLEAR_REQ:
Data.Clear(cfg->type, cfg->channel);
PutReply(client, PLAYER_MSGTYPE_RESP_ACK, NULL);
return 0;
! case PLAYER_MCOM_SET_CAPACITY_REQ:
Data.SetCapacity(cfg->type, cfg->channel, cfg->data.data[0]);
--- 241,250 ----
}
break;
! case PLAYER_MCOM_REQ_CLEAR:
Data.Clear(cfg->type, cfg->channel);
PutReply(client, PLAYER_MSGTYPE_RESP_ACK, NULL);
return 0;
! case PLAYER_MCOM_REQ_SET_CAPACITY:
Data.SetCapacity(cfg->type, cfg->channel, cfg->data.data[0]);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit