Summary of object CmdLn | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
int | getIntDef( iOCmdLn inst, const char* key, int defval ); Get an integer value by key. Returns given default value if not found.
| ||||||||||||
const char* | getStr( iOCmdLn inst, const char* key ); Get a string value by key.
| ||||||||||||
const char* | getStrDef( iOCmdLn inst, const char* key, const char* defval ); Get a string value by key. Returns given default value if not found.
| ||||||||||||
Boolean | hasKey( iOCmdLn inst, const char* key ); Test if the given key was on the commandline.
| ||||||||||||
iOCmdLn | inst( int argc, const char** argv ); Creates a commandline object.
|
Summary of object Dir | |||||||||
---|---|---|---|---|---|---|---|---|---|
typedef | enum {SORT_NAME=0, SORT_OLDEST=1, SORT_NEWEST=2} sortmode | ||||||||
void | cleandirlist( iOList list ); free all memory allocated by listdir()
| ||||||||
void | close( iODir inst ); Closes the direntry.
| ||||||||
int | getRc( iODir inst ); Get the last error.
| ||||||||
iODir | inst( const char* path ); Creates a directory object.
| ||||||||
iOList | listdir( const char* path, const char* ext, sortmode sort ); Scans the directory for entries with given ending.
| ||||||||
Boolean | open( iODir inst ); Opens the directory for reading.
| ||||||||
const char* | read( iODir inst ); Reads an direntry.
| ||||||||
int | scandir( const char* path, const char* ext ); Scans the directory for entries with given ending.
|
Summary of object Doc | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {MaxNodeNameLen=1024,MaxAttrNameLen=1024,MaxAttrValLen=1024} parserConst File type. | ||||||||||||||||
const const char* | ENC_UTF8 = UTF-8 | ||||||||||||||||
const const char* | ENC_ISO885915 = ISO-8859-15 | ||||||||||||||||
Boolean | getBool( iODoc inst, const char* nodename, const char* attrname, Boolean defval ); Search for a given attribute in the given node.
| ||||||||||||||||
iONode | getDocNode( iODoc inst ); Document node keeps all 1st level nodes.
| ||||||||||||||||
const char* | getEncoding( void ); Get XML encoding for serialize. | ||||||||||||||||
char* | getEncodingProperty( void ); Get XML encoding as a property: | ||||||||||||||||
int | getInt( iODoc inst, const char* nodename, const char* attrname, int defval ); Search for a given attribute in the given node.
| ||||||||||||||||
iONode | getRootNode( iODoc inst ); This is probably what you want.
| ||||||||||||||||
const char* | getStr( iODoc inst, const char* nodename, const char* attrname, const char* defval ); Search for a given attribute in the given node.
| ||||||||||||||||
Boolean | isHTMLEscapes( void ); Is HTML escapes set. | ||||||||||||||||
Boolean | isIgnoreCase( void ); Ignoring case in node and attribute names. | ||||||||||||||||
Boolean | isUTF2Latin( void ); Is UTF-8 decoded to Latin. | ||||||||||||||||
Boolean | isUTF8Encoded( iODoc inst ); Is XML UTF-8 encoded.
| ||||||||||||||||
Boolean | isUTF8Encoding( void ); UTF-8 encoding for serializing. | ||||||||||||||||
Boolean | isUniCodeEscapes( void ); Is UniCode escapes set. | ||||||||||||||||
char* | node2String( iONode node, Boolean escaped ); Represents a node recursive as string.
| ||||||||||||||||
iODoc | parse( const char* xml ); Parses given buffer.
| ||||||||||||||||
void | setEncoding( const char* enc ); Set XML encoding for serialize.
| ||||||||||||||||
void | setHTMLEscapes( Boolean html ); Set HTML escapes.
| ||||||||||||||||
void | setIgnoreCase( Boolean ignore ); Ignoring case in node and attribute names.
| ||||||||||||||||
void | setUTF2Latin( Boolean decode ); Is UTF-8 decoded to Latin.
| ||||||||||||||||
void | setUniCodeEscapes( Boolean uni ); Set UniCode escapes.
| ||||||||||||||||
void | setXMLProlog( Boolean prolog ); Add XML Prolog.
|
Summary of object Ebcdic | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {CODEPAGE_DEFAULT=0,CODEPAGE_1252=1252,CODEPAGE_437=437,CODEPAGE_850=437} codepage CodePage. | ||||||||||||
char* | Ascii2Ebcdic( iOEbcdic inst, char* ascii, int count ); Converts ascii into ebcdic.
| ||||||||||||
char* | Ebcdic2Ascii( iOEbcdic inst, char* ebcdic, int count ); Converts ebcdic into ascii.
| ||||||||||||
char* | Ebcdic2ExtAscii( iOEbcdic inst, char* ebcdic, int count ); Converts ebcdic into ascii.
| ||||||||||||
char* | Ebcdic2TrueAscii( iOEbcdic inst, char* ebcdic, int count ); Converts ebcdic into ascii.
| ||||||||||||
char | getAscii( iOEbcdic inst, char ebcdic ); Gets the ascii coding for the given ebcdic code.
| ||||||||||||
char | getEbcdic( iOEbcdic inst, char ascii ); Gets the ebcdic coding for the given ascii code.
| ||||||||||||
iOEbcdic | inst( codepage CodePage, const char* converterfile ); Object creator.
|
Summary of object Event | |||||||||
---|---|---|---|---|---|---|---|---|---|
iOEvent | inst( const char* name, Boolean create ); Object creator.
| ||||||||
Boolean | reset( iOEvent inst ); Reset the event.
| ||||||||
Boolean | set( iOEvent inst ); Set the event.
| ||||||||
Boolean | trywait( iOEvent inst, int time ); Wait a given time for event to become posted.
| ||||||||
Boolean | wait( iOEvent inst ); Wait for event to become posted.
|
Summary of object File | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {OPEN_WRITE=0, OPEN_READONLY=1, OPEN_APPEND=2, OPEN_READWRITE=3} openmode CodePage. | ||||||||||||
const const char* | FUSER_RC = R Use the fusers returncode to determine the access state. | ||||||||||||
const const char* | FUSER_FILE = F Redirect the fuser output into a tempfile to determine the access state. | ||||||||||||
Boolean | access( const char* filename ); Test for read permission.
| ||||||||||||
Boolean | append( iOFile inst, const char* buffer, long size ); Appends a buffer to the file.
| ||||||||||||
Boolean | cd( const char* pathname ); Change the working directory.
| ||||||||||||
Boolean | close( iOFile inst ); Closes the file. It does not cleanup this object.
| ||||||||||||
void | convertPath2OSType( const char* pathname ); Changes the separators according the OS.
| ||||||||||||
Boolean | cp( const char* src, const char* dst ); Copies a file.
| ||||||||||||
Boolean | exist( const char* name ); Checks for file or directory existence.
| ||||||||||||
long | fileSize( const char* filename ); Gets the filesize in bytes.
| ||||||||||||
long | fileTime( const char* filename ); Gets the modification time for the given file.
| ||||||||||||
Boolean | flush( iOFile inst ); Writes all buffered byte on disk.
| ||||||||||||
Boolean | fmt( iOFile inst, const char* fstr, ... ); Writes a formatted string into the file.
| ||||||||||||
Boolean | forcerename( const char* oldname, const char* newname ); Renames a file, target will be removed if the newname already exist.
| ||||||||||||
const char* | getFilename( iOFile inst ); Gets the filename used by this file object.
| ||||||||||||
char* | getPath( const char* path ); Returns a new allocated path string.
| ||||||||||||
int | getRc( iOFile inst ); Get the latest error.
| ||||||||||||
long | getReaded( iOFile inst ); Gets the count of the readed bytes.
| ||||||||||||
FILE* | getStream( iOFile inst );
| ||||||||||||
long | getWritten( iOFile inst ); Gets the count of the written bytes.
| ||||||||||||
long | getpos( iOFile inst ); Gets the filepointer position.
| ||||||||||||
iOFile | inst( const char* path, int openflag ); Object creator.
| ||||||||||||
Boolean | isAbsolute( const char* path ); Checks if given path is absolute.
| ||||||||||||
Boolean | isAccessed( const char* filename ); Checks with fuser if the file is accessed by another process.
| ||||||||||||
Boolean | isDirectory( const char* filename ); True if given name points to a directory.
| ||||||||||||
Boolean | isRegularFile( const char* filename ); False if given name points not to a regular file.
| ||||||||||||
Boolean | mkdir( const char* dirname ); Make directory.
| ||||||||||||
char* | pwd( void ); The process working directory. | ||||||||||||
Boolean | read( iOFile inst, char* buffer, long size ); Reads from file; True if successful.
| ||||||||||||
Boolean | remove( const char* filename ); Removes the given file.
| ||||||||||||
Boolean | rename( const char* oldname, const char* newname ); Renames a file.
| ||||||||||||
Boolean | reopen( iOFile inst, Boolean truncate ); Reopens this file.
| ||||||||||||
Boolean | rewind( iOFile inst ); Sets the filepointer to the beginning of the file.
| ||||||||||||
const char* | ripPath( const char* filename ); Returns a pointer to the filename.
| ||||||||||||
Boolean | rmdir( const char* path ); Removes given directory.
| ||||||||||||
void | setFilename( iOFile inst, const char* filename ); Sets the filename to use with this object.
| ||||||||||||
void | setFuser( const char* filename ); Sets the fuser command to use for isAccessed.
| ||||||||||||
void | setFuserUsage( const char* usage ); The Linux fuser returns a useable rc. With all other unixes we must use a temp file.
| ||||||||||||
Boolean | setfileTime( const char* filename, long filetime ); Sets the modification time for the given file.
| ||||||||||||
Boolean | setpos( iOFile inst, long offset ); Sets the filepointer to the given offset.
| ||||||||||||
long | size( iOFile inst ); Get the filesize in bytes.
| ||||||||||||
Boolean | write( iOFile inst, const char* buffer, long size ); Write to file; True if successful.
| ||||||||||||
Boolean | writeStr( iOFile inst, const char* str ); Appends a string to the file.
|
Summary of object GZip | |||||
---|---|---|---|---|---|
Boolean | compress( iOGZip inst );
| ||||
Boolean | deCompress( iOGZip inst );
| ||||
int | getRc( iOGZip inst );
| ||||
iOGZip | inst( const char* fileName ); Object creator. |
Summary of object JS | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | void(*jsListener )( int dev, int type, int number, int value, unsigned long msec ) | ||||||||||||
int | init( iOJS inst, int* devicemap );
| ||||||||||||
iOJS | inst( void ); Object creator. | ||||||||||||
Boolean | setListener( iOJS inst, jsListener listener, int devnr ); Set an JS listener.
| ||||||||||||
void | start( iOJS inst );
|
Summary of object Lib | |||||||||
---|---|---|---|---|---|---|---|---|---|
const void* | getProc( iOLib inst, const char* procname ); Get a library procedure.
| ||||||||
iOLib | inst( const char* name ); Object creator.
|
Summary of object List | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | int(*comparator)(obj* o1, obj* o2) | ||||||||||||
void | add( iOList inst, obj object ); Adds an object to the list.
| ||||||||||||
void | clear( iOList inst ); Empties the list.
| ||||||||||||
obj | first( iOList inst ); Gets the first object from the list.
| ||||||||||||
obj | get( iOList inst, int pos ); Gets an object from the list by position.
| ||||||||||||
int | getIndex( iOList inst ); Gets the current pointer position.
| ||||||||||||
void | insert( iOList inst, int pos, obj object ); Inserts an object into the list.
| ||||||||||||
iOList | inst( void ); Object creator. | ||||||||||||
obj | next( iOList inst ); Gets the next object from the list.
| ||||||||||||
obj | remove( iOList inst, int pos ); Removes an object from the list by position.
| ||||||||||||
obj | removeObj( iOList inst, obj object ); Removes an object from the list by reference.
| ||||||||||||
void | replace( iOList inst, int pos, obj object ); Replaces an object.
| ||||||||||||
int | size( iOList inst ); Gets the number of objects currently in the list.
| ||||||||||||
void | sort( iOList inst, comparator comp ); Sorts this list.
|
Summary of object Map | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
void | clear( iOMap inst ); Clear the map.
| ||||||||||||
obj | first( iOMap inst ); Get the first item from the map.
| ||||||||||||
obj | get( iOMap inst, const char* key ); Get an item from the map.
| ||||||||||||
iOList | getList( iOMap inst ); Get all mapped objects as a list.
| ||||||||||||
Boolean | haskey( iOMap inst, const char* key ); Check if a map entry exist with the given key.
| ||||||||||||
iOMap | inst( void ); Map object creator. | ||||||||||||
obj | next( iOMap inst ); Get the next item from the map.
| ||||||||||||
void | put( iOMap inst, const char* key, obj val ); Put a new item in the map.
| ||||||||||||
obj | remove( iOMap inst, const char* key ); Remove an item from the map.
| ||||||||||||
int | size( iOMap inst ); Get the size of the map. (Number of objects in the map.)
|
Summary of object Mem | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {MEMTYPE_ALLOC=0,MEMTYPE_REALLOC,MEMTYPE_CHECK,MEMTYPE_FREE} memOpType Memory operation type. | ||||||||||||||||||||
typedef | enum {RocsAttrID=0, RocsCmdLnID, RocsDirID, RocsDocID, RocsEventID, RocsFileID, RocsLibID, RocsListID, RocsMapID, RocsMutexID, RocsNodeID, RocsQueueID, RocsSerialID, RocsSocketID, RocsStrID, RocsStringID, RocsSystemID, RocsThreadID, RocsTraceID, RocsEbcdicID, RocsMsgID, RocsStrTokID, RocsLASTID} RocsMemID For internal use only. | ||||||||||||||||||||
macro | allocMem(size)MemOp.alloc(size,__FILE__,__LINE__) Macro for allocating memory. | ||||||||||||||||||||
macro | reallocMem(p,size)MemOp.realloc(p,size,__FILE__,__LINE__) Macro for re-allocating memory. | ||||||||||||||||||||
macro | freeMem(p)MemOp.free(p,__FILE__,__LINE__) Macro for freeing memory. | ||||||||||||||||||||
macro | allocIDMem(size,id)MemOp.allocTID(size,id,__FILE__,__LINE__) For internal use only. | ||||||||||||||||||||
macro | freeIDMem(p,id)MemOp.freeTID(p,id,__FILE__,__LINE__) For internal use only. | ||||||||||||||||||||
void* | alloc( long size, const char* file, int line ); Allocate memory and records sourcefile and line. (Use macro allocMem.)
| ||||||||||||||||||||
void* | allocTID( long size, int id, const char* file, int line ); Allocate memory and records sourcefile and line. (Use macro allocIDMem.)
| ||||||||||||||||||||
void | basecpy( void* dst, void* src, int asize, int tsize, void* data ); A special copy function for creating rocs-based objects.
| ||||||||||||||||||||
char* | chr( const void* buffer, char c, int size ); Find a char in memoryblock.
| ||||||||||||||||||||
Boolean | cmp( const void* dst, const void* src, int size ); Compairs two memory blocks.
| ||||||||||||||||||||
void | copy( void* dst, const void* src, int size ); Copies a memory block.
| ||||||||||||||||||||
const long* | dumpAllocCntID( void ); Dumps allocation count by ID. | ||||||||||||||||||||
void | free( void* p, const char* file, int line ); Free up memory and records sourcefile and line. (Use macro freeMem.)
| ||||||||||||||||||||
void | freeObj( void** p ); Free up obj memory.
| ||||||||||||||||||||
void | freeTID( void* p, int id, const char* file, int line ); Free up memory and records sourcefile and line. (Use macro freeIDMem.)
| ||||||||||||||||||||
long | getAllocCntID( int id ); Returns allocation count by ID.
| ||||||||||||||||||||
long | getAllocCount( void ); Returns number of allocated memory objects. | ||||||||||||||||||||
long | getAllocSize( void ); Returns total allocated memory size. | ||||||||||||||||||||
int | getDumpSize( void ); | ||||||||||||||||||||
const char* | getLastOperation( void ); | ||||||||||||||||||||
void | init( void ); | ||||||||||||||||||||
void* | realloc( void* p, long size, const char* file, int line ); Re-Allocate memory and records sourcefile and line. (Use macro reallocMem.)
| ||||||||||||||||||||
void | resetDump( void ); | ||||||||||||||||||||
void | set( void* p, int val, int size ); Initializes a memory block.
| ||||||||||||||||||||
void | setDebug( Boolean debug ); If set it prints for every allocation and free a line.
|
Summary of object Mime64 | |
---|---|
Boolean | decode( const char* infile, const char* outfile ); decode the input file into it's |
Boolean | encode( const char* infile, const char* outfile ); encode the input file into mime64 |
Summary of object Msg | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {VOID_DATA, OBJ_DATA, STR_DATA } usrdatatype Cargo type. | ||||||||||||
int | getEvent( iOMsg inst );
| ||||||||||||
obj | getSender( iOMsg inst );
| ||||||||||||
int | getTimer( iOMsg inst );
| ||||||||||||
void* | getUsrData( iOMsg inst );
| ||||||||||||
usrdatatype | getUsrDataType( iOMsg inst );
| ||||||||||||
iOMsg | inst( obj sender, int event ); Object creator.
| ||||||||||||
void | setEvent( iOMsg inst, int event );
| ||||||||||||
void | setTimer( iOMsg inst, int timer );
| ||||||||||||
void | setUsrData( iOMsg inst, void* usrdata, usrdatatype type );
|
Summary of object Mutex | |||||||||
---|---|---|---|---|---|---|---|---|---|
int | getRc( iOMutex inst ); Get last error code.
| ||||||||
iOMutex | inst( const char* name, Boolean create ); Object creator
| ||||||||
Boolean | post( iOMutex inst ); Release the mutext. (release, unlock)
| ||||||||
Boolean | trywait( iOMutex inst, int time ); Wait for the mutext.
| ||||||||
Boolean | wait( iOMutex inst ); Wait for the mutext. (request, lock)
|
Summary of object Node | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {ELEMENT_NODE, TEXT_NODE, PROPERTY_NODE, REMARK_NODE, VARIABLE_NODE} nodetype Node type. | ||||||||||||||||||||
void | addAttr( iONode inst, iOAttr attr ); Add an attribute.
| ||||||||||||||||||||
void | addChild( iONode inst, iONode child ); Add a child node.
| ||||||||||||||||||||
iOAttr | findAttr( iONode inst, const char* attrname ); Search for an attribute with the given name.
| ||||||||||||||||||||
iONode | findNextNode( iONode inst, iONode node ); Find next node with the same name.
| ||||||||||||||||||||
iONode | findNode( iONode inst, const char* nodename ); Search for a child node with the given name.
| ||||||||||||||||||||
iOAttr | getAttr( iONode inst, int idx ); Get an attribute by index.
| ||||||||||||||||||||
int | getAttrCnt( iONode inst ); Get the number of attributes.
| ||||||||||||||||||||
Boolean | getBool( iONode inst, const char* attrname, Boolean defval ); Get an attribute value as boolean.
| ||||||||||||||||||||
iONode | getChild( iONode inst, int idx ); Get an child node by index.
| ||||||||||||||||||||
int | getChildCnt( iONode inst ); Get the number of child nodes.
| ||||||||||||||||||||
double | getFloat( iONode inst, const char* attrname, double defval ); Get an attribute value as float.
| ||||||||||||||||||||
int | getInt( iONode inst, const char* attrname, int defval ); Get an attribute value as integer.
| ||||||||||||||||||||
long | getLong( iONode inst, const char* attrname, long defval ); Get an attribute value as long.
| ||||||||||||||||||||
const char* | getName( iONode inst ); Get the node name.
| ||||||||||||||||||||
iONode | getNode( iONode inst, const char* nodename ); Same as findNode but if no node is found it creates one.
| ||||||||||||||||||||
iONode | getParent( iONode inst ); Get the parent node.
| ||||||||||||||||||||
const char* | getStr( iONode inst, const char* attrname, const char* defval ); Get an attribute value as string.
| ||||||||||||||||||||
nodetype | getType( iONode inst ); Get the node type.
| ||||||||||||||||||||
iONode | inst( const char* name, iONode parent, nodetype type ); Object creator
| ||||||||||||||||||||
iONode | mergeNode( iONode nodeA, iONode nodeB, Boolean overwrite, Boolean recursive, Boolean keepid ); Merge nodeB into A.
| ||||||||||||||||||||
void | removeAttr( iONode inst, iOAttr attr ); Removes an attribute.
| ||||||||||||||||||||
void | removeChild( iONode inst, iONode child ); Remove a child node.
| ||||||||||||||||||||
void | setBool( iONode inst, const char* attrname, Boolean val ); Set an attribute value as boolean.
| ||||||||||||||||||||
void | setFloat( iONode inst, const char* attrname, double val ); Set an attribute value as float.
| ||||||||||||||||||||
void | setInt( iONode inst, const char* attrname, int val ); Set an attribute value as integer.
| ||||||||||||||||||||
void | setLong( iONode inst, const char* attrname, long val ); Set an attribute value as long.
| ||||||||||||||||||||
void | setName( iONode inst, const char* name ); Set the node name.
| ||||||||||||||||||||
void | setParent( iONode inst, iONode parent ); Change or set parent of this node.
| ||||||||||||||||||||
void | setStr( iONode inst, const char* attrname, const char* val ); Set an attribute value as string.
| ||||||||||||||||||||
void | setType( iONode inst, nodetype type ); Set the node type.
| ||||||||||||||||||||
char* | toEscString( iONode inst ); Serialize this node with escaped attribute values.
|
Summary of object Queue | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {low=0,normal=1,high=2} q_prio Priority. | ||||||||||||
int | count( iOQueue inst ); Number of messages in the queue.
| ||||||||||||
obj | get( iOQueue inst ); Read a message.
| ||||||||||||
iOQueue | inst( int size ); Object creator.
| ||||||||||||
Boolean | isEmpty( iOQueue inst ); Are messages in the queue?
| ||||||||||||
Boolean | post( iOQueue inst, obj object, q_prio prio ); Post a message.
| ||||||||||||
obj | waitPost( iOQueue inst ); Wait for a messages.
|
Summary of object Res | |||||||||
---|---|---|---|---|---|---|---|---|---|
const char* | getMenu( iORes inst, const char* key ); Get a message by key.
| ||||||||
const char* | getMsg( iORes inst, const char* key ); Get a message by key.
| ||||||||
const char* | getTip( iORes inst, const char* key ); Get a tooltip by key.
| ||||||||
Boolean | hasKey( iORes inst, const char* key ); Test if the given key is in the XML.
| ||||||||
iORes | inst( const char* xml, const char* lang ); Creates a resource object.
|
Summary of object Serial | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | enum {none=0,even=1,odd=2} serial_parity | ||||||||||||||||||||
typedef | enum {cts=1,dsr=2,xon=3} serial_flow | ||||||||||||||||||||
typedef | enum {onestopbit=1,twostopbits=2} serial_stopbits | ||||||||||||||||||||
typedef | enum {eight=8,seven=7} serial_databits | ||||||||||||||||||||
typedef | enum {undefined=0,mm=1,dcc=2,mma=3} serial_mode | ||||||||||||||||||||
typedef | serial_bps | ||||||||||||||||||||
int | available( iOSerial inst ); Get number of bytes available to read.
| ||||||||||||||||||||
Boolean | close( iOSerial inst ); Close the port.
| ||||||||||||||||||||
void | flush( iOSerial inst ); clear output buffer
| ||||||||||||||||||||
int | getRc( iOSerial inst ); Get last error.
| ||||||||||||||||||||
int | getWaiting( iOSerial inst ); Get number of bytes waiting to send.
| ||||||||||||||||||||
iOSerial | inst( const char* device ); Object creator.
| ||||||||||||||||||||
Boolean | isCTS( iOSerial inst ); Control To Send.
| ||||||||||||||||||||
Boolean | isDSR( iOSerial inst ); Data Set Ready.
| ||||||||||||||||||||
Boolean | isRI( iOSerial inst ); Ring Indicator.
| ||||||||||||||||||||
Boolean | isUartEmpty( iOSerial inst, Boolean soft );
| ||||||||||||||||||||
Boolean | open( iOSerial inst ); Try to open and to initialize the port.
| ||||||||||||||||||||
Boolean | read( iOSerial inst, char* buffer, int count ); Read some bytes.
| ||||||||||||||||||||
void | setBlocking( iOSerial inst, Boolean blocking ); Set blocking/non-blocking io.
| ||||||||||||||||||||
void | setCTS( iOSerial inst, Boolean cts ); Clear To Send.
| ||||||||||||||||||||
void | setDTR( iOSerial inst, Boolean dtr ); Data Terminal Ready.
| ||||||||||||||||||||
void | setDivisor( iOSerial inst, int divisor ); Custom Divisor.
| ||||||||||||||||||||
void | setFlow( iOSerial inst, serial_flow flow ); Set data flow control.
| ||||||||||||||||||||
void | setLine( iOSerial inst, serial_bps bps, serial_databits databits, serial_stopbits stopbits, serial_parity parity ); Set line settings.
| ||||||||||||||||||||
void | setOutputFlow( iOSerial inst, Boolean flow ); set output flow on off
| ||||||||||||||||||||
void | setPortBase( iOSerial inst, int addr ); Set data flow control.
| ||||||||||||||||||||
void | setRTS( iOSerial inst, Boolean rts ); Request To Send.
| ||||||||||||||||||||
void | setSerialMode( iOSerial inst, serial_mode mode ); Set uart speed for MM or DCC
| ||||||||||||||||||||
void | setTimeout( iOSerial inst, int wtime, int trime ); Set timeout.
| ||||||||||||||||||||
void | waitMM( iOSerial inst, int usperiod, int uspause ); Do busy wait for MM protocol
| ||||||||||||||||||||
Boolean | write( iOSerial inst, const char* buffer, int count ); Write some bytes.
|
Summary of object Socket | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | void (*socket_listener)(unsigned char* in,int len) Socket Listener. | ||||||||||||||||
iOSocket | accept( iOSocket inst ); Accept client connections.
| ||||||||||||||||
Boolean | bind( iOSocket inst );
| ||||||||||||||||
Boolean | connect( iOSocket inst ); Connect socket with target.
| ||||||||||||||||
void | disConnect( iOSocket inst ); Disconnect from remote peer.
| ||||||||||||||||
Boolean | fmt( iOSocket inst, const char* format, ... ); Formats a string.
| ||||||||||||||||
char* | getMAC( const char* device );
| ||||||||||||||||
long | getPeeked( iOSocket inst ); Get number of peeked bytes.
| ||||||||||||||||
const char* | getPeername( iOSocket inst );
| ||||||||||||||||
int | getRc( iOSocket inst ); Get last error.
| ||||||||||||||||
long | getReceived( iOSocket inst ); Get number of readed bytes.
| ||||||||||||||||
long | getSended( iOSocket inst ); Get number of written bytes.
| ||||||||||||||||
FILE * | getStream( iOSocket inst ); Get socket stream object.
| ||||||||||||||||
const char* | gethostname( void ); Get local hostname. | ||||||||||||||||
iOSocket | inst( const char* host, int port, Boolean ssl, Boolean udp ); Object creator.
| ||||||||||||||||
iOSocket | instSSLserver( int port, const char* certFile, const char* keyFile ); Object creator.
| ||||||||||||||||
Boolean | isBroken( iOSocket inst ); Is connection broken?
| ||||||||||||||||
Boolean | isConnected( iOSocket inst ); Socket is connected.
| ||||||||||||||||
Boolean | isOpenSSL( void ); OpenSSL support is enabled. | ||||||||||||||||
Boolean | isTimedOut( iOSocket inst ); Check if last returncode is a ETIMEDOUT error.
| ||||||||||||||||
Boolean | peek( iOSocket inst, char* buffer, int size ); Are some bytes waiting to be read?
| ||||||||||||||||
Boolean | read( iOSocket inst, char* buffer, int size ); Read bytes.
| ||||||||||||||||
char* | readStr( iOSocket inst, char* buffer ); Read til a terminating zero is detected.
| ||||||||||||||||
char | readc( iOSocket inst ); Read one character.
| ||||||||||||||||
char* | readln( iOSocket inst, char* buffer ); Read till a linefeed is detected.
| ||||||||||||||||
int | recvfrom( iOSocket inst, char* buffer, int size ); Receive udp message.
| ||||||||||||||||
void | reset( iOSocket inst ); Reset the socket; clear flags.
| ||||||||||||||||
Boolean | sendto( iOSocket inst, char* buffer, int size ); Send udp message.
| ||||||||||||||||
Boolean | setBlocking( iOSocket inst, Boolean blocking ); Set blocking.
| ||||||||||||||||
Boolean | setKeepalive( iOSocket inst, Boolean keepalive );
| ||||||||||||||||
void | setListener( iOSocket inst, socket_listener listener ); NOT IMPLEMENTED!.
| ||||||||||||||||
Boolean | setRcvTimeout( iOSocket inst, int timeout ); Set timeout value for reading.
| ||||||||||||||||
Boolean | setSndTimeout( iOSocket inst, int timeout ); Set timeout value for writing.
| ||||||||||||||||
Boolean | write( iOSocket inst, const char* buffer, int size ); Write bytes.
| ||||||||||||||||
Boolean | writec( iOSocket inst, char c ); Write one character.
|
Summary of object Str | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
char* | byteToStr( unsigned char* bin, int len ); Converts binary data into a hex string like 0AFE...
| ||||||||||||
char* | cat( char* dest, const char* src );
| ||||||||||||
char* | copy( char* dst, const char* src ); Copies a string.
| ||||||||||||
int | copynz( char* snz, int snzlen, const char* str ); Copies a zero terminated string as a non-zero terminated string.
| ||||||||||||
char* | createStamp( void ); Creates a timestamp: YYYYmmdd.hhMMss.SSS. | ||||||||||||
char* | createStampNoDots( void ); Creates a timestamp: YYYYmmddhhMMssSSS. | ||||||||||||
char* | decode4URL( const char* url ); replace url escapes with special chars
| ||||||||||||
char* | dup( const char* src ); Duplicates a string.
| ||||||||||||
char* | encode4URL( const char* url ); replace special chars with url escapes
| ||||||||||||
Boolean | endsWith( const char* str1, const char* str2 ); Check if str1 ends with str2.
| ||||||||||||
Boolean | endsWithi( const char* str1, const char* str2 ); Check if str1 ends with str2. (ignoring case)
| ||||||||||||
Boolean | equals( const char* str1, const char* str2 ); Compares two strings.
| ||||||||||||
Boolean | equalsi( const char* str1, const char* str2 ); Equals ignore case.
| ||||||||||||
Boolean | equalsn( const char* str1, const char* str2, int cnt ); Equals till number off char is reached.
| ||||||||||||
Boolean | equalsni( const char* str1, const char* str2, int cnt ); Equals ignore case till number off char is reached.
| ||||||||||||
char* | find( const char* str, const char* substr ); Finds a substring.
| ||||||||||||
char* | findc( const char* str, char c ); Find the first occurrence of a character.
| ||||||||||||
char* | findi( const char* str, const char* substr ); Finds a substring ignoring case.
| ||||||||||||
char* | fmt( const char* format, ... ); Formats a string.
| ||||||||||||
char* | fmtb( char* buffer, const char* format, ... ); Formats a string into a buffer.
| ||||||||||||
void | free( char* str ); Free up a string allocation.
| ||||||||||||
int | getCntLinefeeds( const char* str ); Returns number of linefeed chars found.
| ||||||||||||
char* | getExtension( const char* str ); Returns a pointer to the string extension: [readme.txt] would return a pointer to [txt].
| ||||||||||||
char* | getLine( const char* str, int nr ); Returns pointer to the specified line.
| ||||||||||||
char* | getNextLine( const char* str, int* nr ); Returns pointer to the next line.
| ||||||||||||
void | int2snz( char* snz, int snzlen, int val ); Converts an integer into a non-zero string.
| ||||||||||||
char* | isoDate( long tt ); Creates an ISO date string: YYYY-mm-dd
| ||||||||||||
char* | isoTime( long tt ); Creates an ISO time string: hh:MM:ss
| ||||||||||||
int | len( const char* str ); Calculates the string length.
| ||||||||||||
void | long2snz( char* snz, int snzlen, long val ); Converts an long into a non-zero string.
| ||||||||||||
int | replaceAll( char* str, char charA, char charB ); Replace all charA's with charB
| ||||||||||||
char* | replaceAllSubstitutions( const char* str ); Replace all environment variables with there current values.
| ||||||||||||
char* | snz2sz( const char* snz, int snzlen ); Converts an non-zero string as a zero terminated string.
| ||||||||||||
Boolean | startsWith( const char* str1, const char* str2 ); Check if str1 starts with str2.
| ||||||||||||
Boolean | startsWithi( const char* str1, const char* str2 ); Check if str1 starts with str2. (ignoring case)
| ||||||||||||
unsigned char* | strToByte( const char* str ); Converts a hex string into binary data
| ||||||||||||
const char* | strlwr( const char* str ); Converts all chars into lowercase.
| ||||||||||||
const char* | strupr( const char* str ); Converts all chars into uppercase.
| ||||||||||||
char* | trim( char* str ); Removes leading and trailing blanks.
|
Summary of object StrTok | |||||||||
---|---|---|---|---|---|---|---|---|---|
int | countTokens( iOStrTok inst ); Get number of tokens.
| ||||||||
Boolean | hasMoreTokens( iOStrTok inst ); There are more tokens left to read.
| ||||||||
iOStrTok | inst( const char* str, char sep ); Object creator.
| ||||||||
const char* | nextToken( iOStrTok inst ); A token.
|
Summary of object String | |||||
---|---|---|---|---|---|
iOString | inst( const char* str ); Object creator.
| ||||
int | len( iOString inst ); String length.
| ||||
const char* | str( iOString inst ); String value.
|
Summary of object System | |||||||||
---|---|---|---|---|---|---|---|---|---|
typedef | enum {OSTYPE_UNIX, OSTYPE_DOS} ostype OS type. | ||||||||
const int | vmajor = 1 | ||||||||
const int | vminor = 2 | ||||||||
const int | patch = 0 | ||||||||
const const char* | builddate = $__DATE__ | ||||||||
const const char* | buildtime = $__TIME__ | ||||||||
Boolean | accessDev( const char* device, Boolean readonly ); check device access
| ||||||||
Boolean | accessPort( int from, int num ); try to get port access
| ||||||||
void | beep( void ); Beeps. | ||||||||
char* | cp1252toISO885915( const char* str ); Translates Windows CP1252 into Latin 15.
| ||||||||
const char* | getBuild( void ); Get the Rocs build string. | ||||||||
const char* | getErrStr( int error ); Translates an error code into a string.
| ||||||||
char | getFileSeparator( void ); | ||||||||
char* | getGUID( const char* macdev ); Get global unique ID. (32 chars long)
| ||||||||
int | getMillis( void ); | ||||||||
ostype | getOSType( void ); | ||||||||
char | getPathSeparator( void ); | ||||||||
char | getPathSeparator4OS( ostype type ); Path separator for a specific OS type.
| ||||||||
const char* | getProperty( const char* key ); Reads an environment variable.
| ||||||||
const char* | getSigStr( int sig ); Translates an signal number into a string.
| ||||||||
unsigned long | getTick( void ); System tick in 10ms. | ||||||||
int | getTime( int* hours, int* minutes, int* seconds ); returns milliseconds | ||||||||
char* | getUNC( const char* filepath ); Translates a local path into a UNC.
| ||||||||
const char* | getUserName( void ); Login username. | ||||||||
const char* | getWSName( void ); Workstation name. | ||||||||
int | getpid( void ); Process ID. | ||||||||
iOSystem | inst( void ); Object creator. (Singleton) | ||||||||
Boolean | isUnix( void ); | ||||||||
Boolean | isWindows( void ); | ||||||||
char* | latin2utf( const char* latinstr ); Translates Latin 15 into UTF-8.
| ||||||||
byte | readPort( int port ); read a byte to the port | ||||||||
Boolean | releasePort( int from, int num ); release the port access
| ||||||||
Boolean | setAdmin( void ); | ||||||||
int | system( const char* cmd, Boolean async ); Starts a system command.
| ||||||||
Boolean | uBusyWait( int us );
| ||||||||
char* | utf2latin( const char* utfstr ); Translates fitting UTF-8 encodings into Lantin 15.
| ||||||||
void | writePort( int port, byte val ); write a byte to the port |
Summary of object Thread | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | void (*thread_run)(void*) | ||||||||||||
iOThread | find( const char* name ); Find a thread by name.
| ||||||||||||
iOThread | findById( unsigned long id ); Find a thread by id.
| ||||||||||||
iOList | getAll( void ); Get a list of all threads. | ||||||||||||
const char* | getName( iOThread inst ); Thread name.
| ||||||||||||
void* | getParm( iOThread inst ); Get parameter object.
| ||||||||||||
obj | getPost( iOThread inst ); Get post from the queue. (NULL if nothing is in queue.)
| ||||||||||||
unsigned long | id( void ); Get current thread id. | ||||||||||||
iOThread | inst( const char* name, thread_run run, void* parm ); Object creator.
| ||||||||||||
Boolean | isPause( iOThread inst ); Pause signaled.
| ||||||||||||
Boolean | isQuit( iOThread inst ); Quit signaled.
| ||||||||||||
Boolean | join( iOThread inst ); Waits for thread termination and returns True if ok.
| ||||||||||||
void | kill( iOThread inst ); Kill a thread by reference.
| ||||||||||||
void | pause( iOThread inst, Boolean pause ); set pause flag
| ||||||||||||
Boolean | post( iOThread inst, obj msg ); Post a message into the queue.
| ||||||||||||
void | requestQuit( iOThread inst ); Signals thread to stop as soon as possible.
| ||||||||||||
void | requestQuitAll( void ); Signals all thread to stop as soon as possible. | ||||||||||||
void | setDescription( iOThread inst, const char* desc );
| ||||||||||||
void | setHigh( iOThread inst ); Sets the priority to high.
| ||||||||||||
void | setStacksize( iOThread inst, long size ); Change the default stacksize.
| ||||||||||||
void | sleep( int time ); Sleeps the current thread.
| ||||||||||||
Boolean | start( iOThread inst ); Starts the thread runner.
| ||||||||||||
obj | waitPost( iOThread inst ); Get post from the queue. (Wait until post comes in queue.)
|
Summary of object Trace | |||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
typedef | void(*trcListener )(int level, char* module, char* msg, int rc, Boolean dump) | ||||||||||||||||||||||||||||
typedef | void(*ExceptionListener )(int level, char* msg) | ||||||||||||||||||||||||||||
typedef | enum {TRCLEVEL_EXCEPTION=0x0001,TRCLEVEL_INFO =0x0002,TRCLEVEL_WARNING=0x0004,TRCLEVEL_DEBUG =0x0008,
TRCLEVEL_BYTE =0x0010,TRCLEVEL_METHOD=0x0020,TRCLEVEL_MEMORY =0x0040,TRCLEVEL_PARAM =0x0080,
TRCLEVEL_PROTOCOL =0x0100,TRCLEVEL_ERROR =0x0200,TRCLEVEL_PARSE =0x0400,TRCLEVEL_WRAPPER=0x0800,
TRCLEVEL_USER1 =0x1000,TRCLEVEL_USER2 =0x2000,TRCLEVEL_MONITOR=0x4000,TRCLEVEL_XMLH =0x8000,
TRCLEVEL_USER =0xF000,TRCLEVEL_CALC =0x10000,TRCLEVEL_ALL =0xFFFFFF} tracelevel Trace levels. | ||||||||||||||||||||||||||||
void | dmp( const void* cargo, tracelevel level, int id, const char* buffer, int size ); Trace a binary buffer.
| ||||||||||||||||||||||||||||
void | dump( const void* cargo, tracelevel level, const char* buffer, int size ); Trace a binary buffer.
| ||||||||||||||||||||||||||||
iOTrace | get( void ); Get's the trace object. | ||||||||||||||||||||||||||||
const char* | getCurrentFilename( iOTrace inst ); Get the current trace filename.
| ||||||||||||||||||||||||||||
int | getDumpsize( iOTrace inst ); Get trace dumpsize.
| ||||||||||||||||||||||||||||
const FILE* | getF( iOTrace inst ); Get the current trace FILE object.
| ||||||||||||||||||||||||||||
const char* | getFilename( iOTrace inst ); Get the trace filename.
| ||||||||||||||||||||||||||||
tracelevel | getLevel( iOTrace inst ); Get the trace level(s).
| ||||||||||||||||||||||||||||
const char* | getOS( void ); Get the current operating system. | ||||||||||||||||||||||||||||
iOTrace | inst( tracelevel level, const char* filename, Boolean toStdErr ); Object creator.
| ||||||||||||||||||||||||||||
Boolean | isStdErr( iOTrace inst ); Get trace to stderr.
| ||||||||||||||||||||||||||||
void | printHeader( void ); Prints the trace header. | ||||||||||||||||||||||||||||
void | println( const char* fmt, ... ); Prints one line into the trace.
| ||||||||||||||||||||||||||||
void | set( iOTrace inst ); Replace or set the singleton with this one.
| ||||||||||||||||||||||||||||
void | setAppID( iOTrace inst, const char* id ); Sets the application id to use in the trace.
| ||||||||||||||||||||||||||||
void | setDumpsize( iOTrace inst, int size ); Set trace dumpsize.
| ||||||||||||||||||||||||||||
void | setEbcdicDump( iOTrace inst, Boolean ebcdic ); Dump also an ebcdic column.
| ||||||||||||||||||||||||||||
void | setExceptionFile( iOTrace inst, Boolean useexceptionfile ); If set, exceptions are also traced in a separate file.
| ||||||||||||||||||||||||||||
void | setExceptionListener( iOTrace inst, ExceptionListener listener, Boolean timestamp ); Set an exceptionlistener.
| ||||||||||||||||||||||||||||
void | setFileSize( iOTrace inst, int size ); Change the trace max. filesize.
| ||||||||||||||||||||||||||||
void | setFilename( iOTrace inst, const char* filename ); Change the trace filename.
| ||||||||||||||||||||||||||||
void | setInvoke( iOTrace inst, const char* cmd, Boolean async ); Command to invoke when writing a new exception file.
| ||||||||||||||||||||||||||||
void | setLevel( iOTrace inst, tracelevel level ); Change the trace level(s).
| ||||||||||||||||||||||||||||
void | setMainThreadId( unsigned long id ); Set the thread id for main.
| ||||||||||||||||||||||||||||
void | setNrFiles( iOTrace inst, int cnt ); Change the number of files before recycling the oldest.
| ||||||||||||||||||||||||||||
void | setStdErr( iOTrace inst, Boolean tostderr ); Set trace to stderr.
| ||||||||||||||||||||||||||||
void | terrno( const char* objectname, tracelevel level, int line, int id, int error, const char* fmt, ... ); Trace.
| ||||||||||||||||||||||||||||
void | trace( const void* cargo, tracelevel level, int id, const char* fmt, ... ); Trace.
| ||||||||||||||||||||||||||||
void | trc( const char* objectname, tracelevel level, int line, int id, const char* fmt, ... ); Trace.
|
Summary of object WrpInf | |||||||||
---|---|---|---|---|---|---|---|---|---|
iOList | getVars( iONode wrp ); Get all var nodes.
| ||||||||
iONode | getWrapper( iOWrpInf inst, const char* wrpname ); Get a wrapper by key.
| ||||||||
iOWrpInf | inst( const char** xmls, int cnt ); Creates a resource object.
|
Summary of object Xmlh | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
const const char* | header_tagname = xmlh | ||||||||||||
const const char* | xml_tagname = xml | ||||||||||||
const const char* | bin_tagname = bin | ||||||||||||
const int | initAllocSize = 4096 | ||||||||||||
void | addNode( iOXmlh inst, iONode node ); Add.
| ||||||||||||
const char* | getBinName( iOXmlh inst, int idx ); Get filename for bin block by index.
| ||||||||||||
long | getBinSize( iOXmlh inst, int dataIdx ); Get size of bin block by index.
| ||||||||||||
iONode | getNodeByTagName( iOXmlh inst, const char* name, int idx ); Get header childnode by name.
| ||||||||||||
int | getSizeByTagName( iOXmlh inst, const char* name, int idx ); Get size of block by name.
| ||||||||||||
const char* | getXmlName( iOXmlh inst, int dataIdx ); Get node for xml block by index.
| ||||||||||||
int | getXmlSize( iOXmlh inst, int idx ); Get size of xml block by index.
| ||||||||||||
int | hasBin( iOXmlh inst ); Get number of bin nodes.
| ||||||||||||
int | hasXml( iOXmlh inst ); Get number of xml nodes.
| ||||||||||||
iOXmlh | inst( Boolean create, const char* header_tagname, const char* bin_tagname ); Object creator.
| ||||||||||||
Boolean | isError( iOXmlh inst ); Get error state of Xmlh.
| ||||||||||||
Boolean | read( iOXmlh inst, const byte* buffer, int size ); Reads the Xmlh from buffer. True if complete header is read.
| ||||||||||||
void | reset( iOXmlh inst );
|