/* Sends a message to a known user by name * Parameters: * user - The user name to send to * message - The data to send */ void messageuser(char *user, char *message); /* Sends a message to a known user by CyID * Parameters: * user - The user name to send to * message - The data to send */ void messagecyid(char *cyid, char *message); /* Sends a message to a server * Note this is an especial hack as we might never know the protocol for the CYWIG * However if we do this function would be designed to send a message to the internet bridge. * Alternately this will send a message to the server wherever it is. Possibly it should have * a default to send to the only server around. * Parameters: * server - The name of the server to send to * message - The data to send */ void messageserver(char *server, char *message); /* Send a message to a channel. Channel should be in the range of 900-929 * Parameters: * user - The channel to send on * message - The data to send */ void messagechannel(int channel, char *message); /* Queries by RF for users on a channel * Returns: * Number of users on a channel * Parameters: * name - Array of names of Cybiko's who have responded to Ping * cyid - Array of cyid of Cybiko's who have responded to Ping int pingchannel(char *name, char *cyid); /* Responds to a ping request * Parameters: * name - this Cybiko name * cyid - this Cybiko ID void pong(char *name, char *cyid); /* Listen for messages on all channels * Returns: * Number of bytes received * Parameters: * name - Sending Cybiko name * cyid - Sending Cybiko ID * message - The message received int listenrf(char *name, char *cyid, char *message); /* Listen for messages on one channel * Returns: * Number of bytes received * Parameters: * channel - The channel # to listen on (900-929) * name - Sending Cybiko name * cyid - Sending Cybiko ID * message - The message received int listenchannelrf(int channel, char *name, char *cyid, char *message); /* Queries for users in RF range * NOTE: that this will take AT LEAST 7 seconds to return due to maximum transmission rate * (30 channels max 4 transmission/sec = 7.5 seconds) * Returns: * Number of users on a channel * Parameters: * name - Array of names of Cybiko's who have responded to Ping * cyid - Array of cyid of Cybiko's who have responded to Ping int pingnetwork(char *name, char *cyid); /* Queries for known users on a channel * Returns: * Number of users on a channel * Parameters: * staleness - How old the information is (time since update from the last pingchannel or pingnetwork) * name - Array of names of Cybiko's who have responded to Ping * cyid - Array of cyid of Cybiko's who have responded to Ping int infochannel(int staleness, char *name, char *cyid); /* Queries for known users in RF * Returns: * Number of users on a channel * Parameters: * staleness - How old the information is (time since update from the last pingchannel or pingnetwork) * name - Array of names of Cybiko's who have responded to Ping * cyid - Array of cyid of Cybiko's who have responded to Ping int infonetwork(char *name, char *cyid);