#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/time.h>
#include <sys/times.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/file.h>
#include <netdb.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <time.h>
#include <termios.h>
#include <fcntl.h>
#include <signal.h>
#include "isisclient.h"
Go to the source code of this file.
Data Structures | |
struct | ifw_pars |
IFW Filter Wheel Parameter Table. More... | |
Defines | |
#define | DEFAULT_MYID "IFW" |
default app ISIS node name | |
#define | DEFAULT_MYPORT 10701 |
default app ISIS socket port | |
#define | DEFAULT_RCFILE "/home/darkstar/dts/Config/ifwtool.ini" |
default app runtime config file | |
#define | DEFAULT_LOGFILE "/home/darkstar/dts/Logs/ifwtool.log" |
default app runtime log file (unimplemented) | |
#define | DEFAULT_ISISID "IS" |
default ISIS server node name | |
#define | DEFAULT_ISISHOST "localhost" |
default ISIS server host | |
#define | DEFAULT_ISISPORT 6600 |
default ISIS server port number | |
#define | APP_VERSION "1.0 Beta" |
placeholder version number, set in Makefile | |
#define | APP_COMPDATE "2004-01-01" |
placeholder compilation date, set by build script | |
#define | APP_COMPTIME "00:00:00" |
placeholder compilation time, set by build script | |
Typedefs | |
typedef ifw_pars | ifwheel_t |
IFW Filter Wheel Parameter Table. | |
Functions | |
int | LoadConfig (char *) |
Load/Parse ISIS client's runtime configuration file. | |
void | KeyboardCommand (char *) |
Process a command from the client's console keyboard. | |
void | SocketCommand (char *) |
Process a message/command from the client socekt. | |
void | handleint (int) |
Service Ctrl+C (SIGINT) signals. | |
Variables | |
isisclient_t | client |
Global client runtime config table. | |
ifwheel_t | ifw |
Global IFW filter wheel parameter table (declare in main.c). |
Application header for the experimental Optec IFW Filter Wheel controlapplication.
|
default app ISIS node name
|
|
default app ISIS socket port
|
|
default app runtime config file
|
|
default app runtime log file (unimplemented)
|
|
default ISIS server node name
|
|
default ISIS server host
|
|
default ISIS server port number
|
|
placeholder version number, set in Makefile
|
|
placeholder compilation date, set by build script
|
|
placeholder compilation time, set by build script
|
|
IFW Filter Wheel Parameter Table. Contains the basic parameters of one or more Optec filter wheels, as follows:
|
|
Load/Parse ISIS client's runtime configuration file.
|
|
Process a command from the client's console keyboard.
This function parses the interactive command line and calls the appropriate low-level cmd_xxx() command action functions for excuting most commands, as well as servicing ">XX msgtype: command" format raw IMPv2 message sending requests. All keyboard commands are treated as EXEC: type IMPv2 messages. This makes the downstream cmd_xxx() action functions insensitive to whether or not the command came from the keyboard or from a remote ISIS server or client application.
|
|
Process a message/command from the client socekt.
More sophisticated handlers might pass such messages on to parsers/handlers of their own if the inputs were actually used for something other than "visual" information for the user of this application. All messages received from an ISIS node are assumed to be in the proper IMPv2 messaging syntax. Note that EXEC: is new to IMPv2. It allows remote nodes to transmit protected "executive" commands to clients, giving them access to commands that would otherwise only be available on the console keyboard (e.g., the "quit" command). Thus a remote EXEC: command means "act as if this was typed at the keyboard". It is the responsibility of the remote application to make sure that EXEC: is used with care, as you could do something stupid (though your client application should not allow actions that would be physically unsafe to personnel or equipment).
|
|
Service Ctrl+C (SIGINT) signals. Trap and handle any Ctrl+C keys pressed at the command-line interface. Right now it doesn't do much more than note that Ctrl+C has been it, but in the future it could do more if required. |
|
Global client runtime config table.
|
|
Global IFW filter wheel parameter table (declare in main.c).
|