Class IOPortData

Index Home MAE > MAE Architecture > MAE Data Types > Class Index > Class IOPortData

Summary
Public Properties
Public Methods
IOPortData()
inline bool eof() const
inline bool valid() const
inline void clear()
See Also

#include <IOPort.h >

Summary

This structure is used by the IOPort class to manage I/O resource connections.

To use IOPort, you will need a hook in your .mreg file to route internal I/O responses to IOPort:

#msgvalid IOPort::isIOPortMessage(const string & request)

#code

    IOPort::handleMessage(request, param);

Public Properties

string name

Name of the resource

string channel

Name of channel to communicate with resource

long id

Resource id provided by iogw

bool portEof

Flag: True when EOF detected; true EOF when inbuffer is empty

string inbuffer

Inbound buffer to read for all ports (per resource)

long filepos

Number of bytes read/written from/to port (file pos) (per resource)

bool readable

Flag: content is readable

bool writable

Flag: content is writable

long filelength

Flag: content length (-1 if not known)

static long blockingId

If a blocking operation is in progress, this is the mbuf id

static string blockingOp

If a blocking operation is in progress, we're waiting on this response

int errorNo

errno of last operation (from iogw)

string errmsg

text error message of last operation (from iogw)

char cbtype

Input received callback type (C=character, L=Line, F=file)

void* cbdata

Input received callback data

IOPortDataCB cbfn

Input received callback function


Public Methods

IOPortData()

inline bool eof() const

Check if we have reached end-of-file for this resource

Return value: true if EOF, false otherwise

inline bool valid() const

Check if this structure refers to a valid IOPort.

Return value: true if the resource is valid, false otherwise

inline void clear()

Clear the data

See Also

IOPort class