COVISE Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
covise::coSimLib Class Reference

#include <coSimLib.h>

Inheritance diagram for covise::coSimLib:
Inheritance graph
[legend]
Collaboration diagram for covise::coSimLib:
Collaboration graph
[legend]

Classes

struct  PortListElem
 

Public Types

typedef int int32
 
- Public Types inherited from covise::coModule
enum  { FAIL = -1, SUCCESS = 0, STOP_PIPELINE = -1, CONTINUE_PIPELINE = 0 }
 return values for call-back functions More...
 
- Public Types inherited from covise::CoviseBase
enum  { MAX_PORTS = 4096 }
 
enum  { ADD_OBJ, DEL_OBJ }
 

Public Member Functions

void executeCommands ()
 
virtual void sockData (int sockNo)
 Overload this if you register any ports. More...
 
 coSimLib (int argc, char *argv[], const char *moduleName, const char *desc)
 Constructor: give module name, so we can read config file. More...
 
virtual ~coSimLib ()
 Destructor. More...
 
int setTargetHost (const char *hostname)
 set target/local host: return -1 on error (e.g. not found in nameserver) More...
 
int setLocalHost (const char *hostname)
 set local host: return -1 on error More...
 
int setUserArg (int num, const char *data)
 set a user startup argument: 0 <= num < 63 More...
 
int startSim (int reattach=0)
 start the user's application and connect to it More...
 
void resetSimLib ()
 start the remote control server: 0=normal termination, -1 on error More...
 
int isConnected ()
 are we connected to a simulation ? More...
 
int recvData (void *buffer, size_t length)
 receive and send data binary: do only if you are sure... More...
 
int sendData (const void *buffer, size_t length)
 
int recvBS_Data (void *buffer, size_t length)
 
int sendBS_Data (void *buffer, size_t length)
 
int coParallelInit (int numParts, int numPorts)
 initialize Parallelism: local COPAIN More...
 
int coParallelPort (const char *portName, int isCellData)
 initialize Parallel ports: local COPAPO More...
 
int setParaMap (int isCell, int isFortran, int nodeNo, int length, int32 *nodeMap)
 set the mapping from the module: takes over map, do not delete!! More...
 
void setVerbose (int level)
 set verbose level More...
 
int getVerboseLevel ()
 request verbose level More...
 
coChoiceParamgetStartupChoice ()
 get the startup choice More...
 
int simRequestExec ()
 check whether simulation requested exec More...
 
void setPorts (int min, int max)
 
- Public Member Functions inherited from covise::coModule
 coModule (int argc, char *argv[], const char *desc=NULL, bool propagate=false)
 YAC-compatible constructor. More...
 
virtual ~coModule ()
 Destructor : virtual in case we derive objects. More...
 
bool GoodOctTrees (const coDistributedObject *grid, const coDistributedObject *otree)
 
void selfExec ()
 execute your own module More...
 
void setExecGracePeriod (float gracePeriod)
 set the module's grace period More...
 
coChoiceParamparaSwitch (const char *name, const char *desc)
 start a parameter switch: return a pointer to its master choice More...
 
int paraEndSwitch ()
 end a pending parameter switch More...
 
int paraCase (const char *name)
 start a parameter switch's case More...
 
int paraEndCase ()
 end a pending parameter switch's case More...
 
void autoInitParam (int value=0)
 request automatical fireUp More...
 
void addSocket (int socket)
 Add socket to the main loop and a handler object to handle the events. More...
 
void removeSocket (int socket)
 Add socket to the main loop and a handler object to handle the events. More...
 
virtual void init (int argc, char *argv[])
 initialize Covise do NOT enter mainLoop More...
 
virtual void start (int argc, char *argv[])
 initialize Covise and start main event loop -> never returns More...
 
virtual int compute (const char *port)
 called for every EXEC callback: Overload it with your own compute routine More...
 
virtual int addObject (const char *objectNameToAdd, const char *objectNameToDelete)
 called for every ADD_OBJECT callback: Overload it with your own process routine More...
 
virtual void param (const char *paramName, bool inMapLoading)
 Overload this if you want to notice parameter changes. More...
 
virtual void feedback (int len, const char *data)
 Overload this function if you need a feedback routine. More...
 
virtual void quit (void)
 Overload this function if you need a cleanup routine. More...
 
virtual void postInst ()
 Overload this if you want to do anything between init and main loop. More...
 
virtual float idle ()
 
virtual void handleMessages (float time)
 handle messages, does block for time seconds (forever if time == -1) More...
 
virtual void mainLoop ()
 To overload the mainLoop: only do this if you REALLY know what you do. More...
 
void stopPipeline ()
 stop the pipeline: do not execute Modules behind this one More...
 
coBooleanParamaddBooleanParam (const char *name, const char *desc)
 add Boolean Port : return NULL on error More...
 
coFileBrowserParamaddFileBrowserParam (const char *name, const char *desc)
 add Browser Port : return NULL on error More...
 
coChoiceParamaddChoiceParam (const char *name, const char *desc)
 add Choice Port : return NULL on error More...
 
coColormapChoiceParamaddColormapChoiceParam (const char *name, const char *desc)
 add Color Choice Port : return NULL on error More...
 
coMaterialParamaddMaterialParam (const char *name, const char *desc)
 add Material Port : return NULL on error More...
 
coColormapParamaddColormapParam (const char *name, const char *desc)
 add Colormap Port : return NULL on error More...
 
coColorParamaddColorParam (const char *name, const char *desc)
 add Color Port : return NULL on error More...
 
coFloatParamaddFloatParam (const char *name, const char *desc)
 add Float Scalar Port : return NULL on error More...
 
coFloatSliderParamaddFloatSliderParam (const char *name, const char *desc)
 add Float Slider Port : return NULL on error More...
 
coFloatVectorParamaddFloatVectorParam (const char *name, const char *desc, int length=3)
 add Float Vector Port : return NULL on error More...
 
coIntScalarParamaddInt32Param (const char *name, const char *desc)
 add Integer Scalar Port : return NULL on error More...
 
coIntSliderParamaddIntSliderParam (const char *name, const char *desc)
 add Integer Slider Port : return NULL on error More...
 
coIntVectorParamaddInt32VectorParam (const char *name, const char *desc, int length=3)
 add Integer Vector Port : return NULL on error More...
 
coStringParamaddStringParam (const char *name, const char *desc)
 add String Port : return NULL on error More...
 
coTimerParamaddTimerParam (const char *name, const char *desc)
 add Timer Port : return NULL on error More...
 
coInputPortaddInputPort (const char *name, const char *types, const char *desc)
 add Input Data Port : return NULL on error More...
 
coOutputPortaddOutputPort (const char *name, const char *types, const char *desc)
 add Output Data Port : return NULL on error More...
 
void setInfo (const char *value) const
 Set the info Popup text. More...
 
void setTitle (const char *value)
 Set the Module's title. More...
 
bool titleChanged ()
 
const char * getTitle ()
 
- Public Member Functions inherited from covise::CoviseBase
 CoviseBase ()
 

Protected Types

enum  CommandType {
  COMM_ERROR = -1, COMM_NONE = 0, COMM_QUIT, COMM_TEST,
  EXEC_COVISE, GET_SLI_PARA, GET_SC_PARA_FLO, GET_SC_PARA_INT,
  GET_CHOICE_PARA, GET_BOOL_PARA, GET_TEXT_PARA, GET_FILE_PARA,
  SEND_USG, SEND_1DATA, SEND_3DATA, EXEC_MOD,
  PARA_INIT, PARA_PORT, PARA_CELL_MAP, PARA_VERTEX_MAP,
  PARA_NODE, ATTRIBUTE, GEO_DIM, BOCO_DIM,
  SEND_GEO, SEND_BOCO, NEWBC, USE_BOCO2,
  COMM_EXIT, COMM_DETACH, GET_INITIAL_PARA_DONE, GET_V3_PARA_FLO
}
 

Protected Member Functions

 coSimLib (const coSimLib &)
 Copy-Constructor: NOT IMPLEMENTED. More...
 
coSimLiboperator= (const coSimLib &)
 Assignment operator: NOT IMPLEMENTED. More...
 
 coSimLib ()
 Default constructor: NOT IMPLEMENTED. More...
 
int reAccept ()
 
- Protected Member Functions inherited from covise::coModule
int add_port (coPort *param)
 allow users to use old-style for all other ports More...
 
coUifElemfindElem (const char *name)
 
virtual void localCompute (void *callbackData)
 
virtual void localAddObject (void *callbackData)
 

Protected Attributes

coChoiceParamp_StartupSwitch
 
- Protected Attributes inherited from covise::coModule
bool _propagateObjectName
 
coUifElemelemList [Covise::MAX_PORTS]
 
int d_numElem
 

Private Member Functions

uint32_t nslookup (const char *name)
 lookup nameserver and return IP, 0 on failure More...
 
int openServer ()
 
int openClient ()
 
int acceptServer (float wait)
 
int handleCommand ()
 
virtual int endIteration ()
 
void closeSocket (int socket)
 

Private Attributes

char * d_userArg [10]
 
uint32_t d_localIP
 
uint32_t d_targetIP
 
uint32_t d_minPort
 
uint32_t d_maxPort
 
uint32_t d_usePort
 
int server_socket
 
int d_socket
 
int d_verbose
 
bool d_byteswap
 
char * d_name
 
int32 d_command
 
int32 ** d_cellMap
 
int32 d_numCells
 
int32 ** d_vertMap
 
int32 d_numVert
 
int d_numNodes
 
struct
covise::coSimLib::PortListElem
d_portList
 
int32 d_actNode
 
char ** d_startup_label
 
const char ** d_startup_line
 
int d_numStartup
 
int d_simExec
 
std::list< command_object * > * command_objects
 
std::list< command_object * > * tmp_objects
 

Additional Inherited Members

- Static Public Member Functions inherited from covise::Covise
static void set_module_description (const char *desc)
 set/get the module description More...
 
static const char * get_module_description ()
 
static void add_port (enum appl_port_type type, const char *name, const char *datatype, const char *description)
 create a new port More...
 
static void set_port_default (const char *name, const char *defVal)
 set a port's default value More...
 
static void set_port_dependency (const char *port, char *depPort)
 declare this (input) port dependent from another (output) port More...
 
static void set_port_required (const char *name, int isReqired)
 tell that this port is (not) required More...
 
static char * get_description_message ()
 
static int is_port_connected (const char *name)
 check whether port is connected - use in compute() CB only More...
 
static char * getObjNameToAdd ()
 
static char * getObjNameToDelete ()
 
static void init (int argc, char *argv[])
 
static void sendFinishedMsg (void *msg)
 
static int check_and_handle_event (float time=0.0)
 
static void do_one_event ()
 
static void ReceiveOneMsg ()
 
static int deleteConnection ()
 
static void main_loop ()
 
static void progress_main_loop ()
 
static void set_start_callback (CoviseCallback *f, void *userData)
 
static void set_add_object_callback (CoviseCallback *f, void *userData)
 
static void set_feedback_callback (FeedbackCallback *f, void *userData)
 
static void set_generic_callback (CoviseCallback *f, void *userData)
 
static void set_sync_callback (CoviseCallback *f, void *userData)
 
static void set_port_callback (CoviseCallback *f, void *userData)
 
static void set_after_finish_callback (CoviseCallback *f, void *userData)
 
static void set_pipeline_finish_callback (CoviseCallback *f, void *userData)
 
static void remove_start_callback ()
 
static void remove_feedback_callback ()
 
static void remove_generic_callback ()
 
static void remove_sync_callback ()
 
static void remove_after_finish_callback ()
 
static void remove_pipeline_finish_callback ()
 
static char * get_reply_port_name ()
 
static char * get_object_name (const char *name)
 
static char * getObjectType (const char *name)
 
static int get_scalar_param (const char *name, long *val)
 
static int get_scalar_param (const char *name, float *val)
 
static int get_vector_param (const char *name, int pos, long *list)
 
static int get_vector_param (const char *name, int pos, float *list)
 
static int get_string_param (const char *name, char **string)
 
static int get_browser_param (const char *name, char **file)
 
static int get_boolean_param (const char *name, int *b)
 
static int get_slider_param (const char *name, long *min, long *max, long *val)
 
static int get_slider_param (const char *name, float *min, float *max, float *val)
 
static int get_text_param (const char *name, char ***text, int *linenum)
 
static int get_timer_param (const char *name, long *start, long *delta, long *state)
 
static int get_passwd_param (const char *name, char **host, char **user, char **passwd)
 
static int get_choice_param (const char *name, int *pos)
 
static int get_choice_param (const char *name, char **string)
 
static int get_material_param (const char *name, char **string)
 
static int get_colormapchoice_param (const char *name, int *pos)
 
static int get_colormapchoice_param (const char *name, char **string)
 
static int get_colormap_param (const char *name, float *min, float *max, int *len, colormap_type *type)
 
static int get_color_param (const char *name, float *r, float *g, float *b, float *a)
 
static int set_scalar_param (const char *name, long val)
 
static int set_scalar_param (const char *name, float val)
 
static int set_vector_param (const char *name, int num, long *list)
 
static int set_vector_param (const char *name, int num, float *list)
 
static int set_string_param (const char *name, char *string)
 
static int set_boolean_param (const char *name, int val)
 
static int set_slider_param (const char *name, long min, long max, long val)
 
static int set_slider_param (const char *name, float min, float max, float val)
 
static int set_choice_param (const char *name, int len, char **list, int pos)
 
static int set_browser_param (const char *name, char *file, char *wildcard)
 
static int set_text_param (const char *name, char *text, int linenum)
 
static int set_timer_param (const char *name, int start, int delta, int state)
 
static int set_passwd_param (const char *name, char *host, char *user, char *passwd)
 
static int set_save_object (char *name)
 
static int set_release_object (char *name)
 
static void cancel_param (const char *name)
 
static void reopen_param (const char *name)
 
static int send_generic_message (const char *keyword, const char *string)
 
static int send_genericinit_message (const char *mkey, const char *keyword, const char *string)
 
static char * get_generic_message ()
 
static void send_stop_pipeline ()
 
static int send_ctl_message (covise_msg_type type, const char *msg_string)
 
static void sendFinishedMsg ()
 
static void callFeedbackCallback (Message *)
 
static void callStartCallback (void)
 
static void callAddObjectCallback (void)
 
static void callGenericCallback (void)
 
static void callSyncCallback (void)
 
static void callPortReplyCallback (void)
 
static void callAfterFinishCallback (void)
 
static void callPipelineFinishCallback (void)
 
static void partobjects_initialized (void)
 
static void addInteractor (coDistributedObject *obj, const char *name, const char *value)
 
- Static Public Member Functions inherited from covise::CoviseBase
static int parseMessage (char *line, char *token[], int tmax, const char *sep)
 
static void set_progress_callback (CoviseCallback *f, void *userData)
 
static void set_quit_callback (CoviseCallback *f, void *userData)
 
static void set_quit_info_callback (CoviseCallback *f, void *userData)
 
static void set_custom_callback (CoviseCallback *f, void *userData)
 
static void set_param_callback (CoviseParamCallback *f, void *userData)
 
static void remove_progress_callback ()
 
static void remove_quit_callback ()
 
static void remove_quit_info_callback ()
 
static void remove_custom_callback ()
 
static void remove_param_callback ()
 
static void set_master_switch_callback (CoviseCallback *f, void *userData)
 
static void remove_master_switch_callback ()
 
static bool is_master ()
 
static int request_param (const char *name)
 
static void enable_param (const char *name)
 
static void disable_param (const char *name)
 
static void hide_param (const char *name)
 
static void show_param (const char *name)
 
static void cancel_param (const char *name)
 
static void reopen_param (const char *name)
 
static int get_reply_passwd (const char **host, const char **user, const char **passwd)
 
static int get_reply_cli (const char **command)
 
static int get_reply_int_slider (long *min, long *max, long *val)
 
static int get_reply_float_slider (float *min, float *max, float *val)
 
static int get_reply_int_vector (int pos, long *val)
 
static int get_reply_float_vector (int pos, float *val)
 
static int get_reply_int_scalar (long *val)
 
static int get_reply_float_scalar (float *val)
 
static int get_reply_boolean (int *)
 
static int get_reply_string (const char **string)
 
static int get_reply_browser (const char **file)
 
static int get_reply_timer (long *start, long *delta, long *state)
 
static int get_reply_arrayset (const char **msg_buf)
 
static int get_reply_choice (int *selected_pos)
 
static int get_reply_choice (int pos, string *choiceLabels)
 
static int get_reply_colormapchoice (int *selected_pos)
 
static int get_reply_colormapchoice (TColormapChoice *values)
 
static int get_reply_material (string *value)
 
static int get_reply_colormap (float *min, float *max, int *len, colormap_type *type)
 
static int get_reply_colormap (int pos, float *r, float *g, float *b, float *a, float *x)
 
static int get_reply_color (float *r, float *g, float *b, float *a)
 
static int update_slider_param (const char *name, long min, long max, long val)
 
static int update_slider_param (const char *name, float min, float max, float val)
 
static int update_scalar_param (const char *name, long val)
 
static int update_scalar_param (const char *name, float val)
 
static int update_vector_param (const char *name, int num, long *list)
 
static int update_vector_param (const char *name, int num, float *list)
 
static int update_string_param (const char *name, char *string)
 
static int update_text_param (const char *name, char *text, int linenum)
 
static int update_boolean_param (const char *name, int val)
 
static int update_choice_param (const char *name, int len, const char *const *list, int pos)
 
static int update_timer_param (const char *name, long start, long delta, long state)
 
static int update_colormap_param (const char *name, float min, float max, const string &cmap)
 
static int update_material_param (const char *name, const string &value)
 
static int update_colormapchoice_param (const char *name, int num, int pos, TColormapChoice *list)
 
static int update_color_param (const char *name, float r, float g, float b, float a)
 
static int get_socket_id ()
 
static const char * get_instance ()
 
static const char * get_host ()
 
static const char * get_module ()
 
static const char * get_reply_param_name ()
 
static void sendWarning (const char *fmt,...)
 send warning messages - printf style More...
 
static void sendError (const char *fmt,...)
 send warning messages - printf style More...
 
static void sendInfo (const char *string,...)
 send warning messages - printf style More...
 
static int send_message (covise_msg_type type, const char *msg_string)
 
static int send_ui_message (const char *keyword, const char *string)
 
static int send_feedback_message (const char *keyword, const char *string)
 
static void set_feedback_info (const char *string)
 
static const char * get_feedback_info ()
 
static char get_feedback_type ()
 
static void send_quit_request ()
 
static void log_message (int line, const char *file, const char *comment)
 
static FILE * fopen (const char *file, const char *mode, char **returnPath=NULL)
 
static int open (const char *file, int mode)
 
static DIR * opendir (const char *file)
 
static void getname (char *buf, const char *file, const char *addpath=NULL)
 
static bool getnameinpath (char *buf, const char *file, const char *path)
 
static void addInteractor (coDistributedObject *obj, const char *name, const char *value)
 
static void printDesc (const char *callname)
 
- Static Public Attributes inherited from covise::CoviseBase
static ApplicationProcessappmod = NULL
 
- Static Protected Member Functions inherited from covise::CoviseBase
static void remove_socket (int sock_id)
 
static void doProgress ()
 
static void doCustom (Message *m)
 
static void doMasterSwitch ()
 
static void doSlaveSwitch ()
 
static void signal_handler (int signo, void *)
 
static void init_emergency_message (void)
 
static void callProgressCallback (void)
 
static void callQuitCallback (void)
 
static void callQuitInfoCallback (void)
 
static void callCustomCallback (void)
 
static void callMasterSwitchCallback (void)
 
static void callParamCallback (bool inMapLoading)
 
- Static Protected Attributes inherited from covise::CoviseBase
static int error = 0
 
static char * reply_keyword = NULL
 
static char * reply_param_name = NULL
 
static char * reply_param_type = NULL
 
static const char ** reply_buffer = NULL
 
static int no_of_reply_tokens = 0
 
static vector< stringtokenlist
 
static MessageapplMsg = NULL
 
static int socket_id = 0
 
static const char * h_name = NULL
 
static const char * m_name = NULL
 
static const char * instance = NULL
 
static Message emergency_message
 
static char * emergency_data
 
static const char * module_description = NULL
 
static bool master = false
 
static char * port_name [MAX_PORTS] = { NULL, NULL }
 
static char * port_description [MAX_PORTS]
 
static enum appl_port_type port_type [MAX_PORTS]
 
static const char * port_default [MAX_PORTS]
 
static char * port_datatype [MAX_PORTS]
 
static char * port_dependency [MAX_PORTS]
 
static int port_required [MAX_PORTS]
 
static int init_flag = 0
 
static char * feedback_info = NULL
 
static CoviseCallbackprogressCallbackFunc = NULL
 
static voidprogressUserData = 0L
 
static voidprogressCallbackData = 0L
 
static CoviseCallbackquitCallbackFunc = NULL
 
static voidquitUserData = 0L
 
static voidquitCallbackData = 0L
 
static CoviseCallbackquitInfoCallbackFunc = NULL
 
static voidquitInfoUserData = 0L
 
static voidquitInfoCallbackData = 0L
 
static CoviseCallbackcustomCallbackFunc = NULL
 
static voidcustomUserData = 0L
 
static voidcustomCallbackData = 0L
 
static CoviseCallbackmasterSwitchCallbackFunc = NULL
 
static voidmasterSwitchUserData = 0L
 
static CoviseParamCallbackparamCallbackFunc = NULL
 
static voidparamUserData = 0L
 
static voidparamCallbackData = 0L
 

Member Typedef Documentation

Member Enumeration Documentation

Enumerator
COMM_ERROR 
COMM_NONE 
COMM_QUIT 
COMM_TEST 
EXEC_COVISE 
GET_SLI_PARA 
GET_SC_PARA_FLO 
GET_SC_PARA_INT 
GET_CHOICE_PARA 
GET_BOOL_PARA 
GET_TEXT_PARA 
GET_FILE_PARA 
SEND_USG 
SEND_1DATA 
SEND_3DATA 
EXEC_MOD 
PARA_INIT 
PARA_PORT 
PARA_CELL_MAP 
PARA_VERTEX_MAP 
PARA_NODE 
ATTRIBUTE 
GEO_DIM 
BOCO_DIM 
SEND_GEO 
SEND_BOCO 
NEWBC 
USE_BOCO2 
COMM_EXIT 
COMM_DETACH 
GET_INITIAL_PARA_DONE 
GET_V3_PARA_FLO 

Constructor & Destructor Documentation

covise::coSimLib::coSimLib ( const coSimLib )
protected

Copy-Constructor: NOT IMPLEMENTED.

covise::coSimLib::coSimLib ( )
protected

Default constructor: NOT IMPLEMENTED.

coSimLib::coSimLib ( int  argc,
char *  argv[],
const char *  moduleName,
const char *  desc 
)

Constructor: give module name, so we can read config file.

constructor

coSimLib::~coSimLib ( )
virtual

Destructor.

Member Function Documentation

int coSimLib::acceptServer ( float  wait)
private
void coSimLib::closeSocket ( int  socket)
private
int coSimLib::coParallelInit ( int  numParts,
int  numPorts 
)

initialize Parallelism: local COPAIN

set the mapping from the module

int coSimLib::coParallelPort ( const char *  portName,
int  isCellData 
)

initialize Parallel ports: local COPAPO

int coSimLib::endIteration ( )
privatevirtual
void coSimLib::executeCommands ( )

execute all commands that were sent by the simulation during sockdata. this method may only be called during compute()

coChoiceParam* covise::coSimLib::getStartupChoice ( )
inline

get the startup choice

int covise::coSimLib::getVerboseLevel ( )
inline

request verbose level

int coSimLib::handleCommand ( )
private

we re-use this buffer frequently...

int coSimLib::isConnected ( )

are we connected to a simulation ?

uint32_t coSimLib::nslookup ( const char *  name)
private

lookup nameserver and return IP, 0 on failure

int coSimLib::openClient ( )
private
int coSimLib::openServer ( )
private
coSimLib& covise::coSimLib::operator= ( const coSimLib )
protected

Assignment operator: NOT IMPLEMENTED.

int coSimLib::reAccept ( )
protected
int coSimLib::recvBS_Data ( void buffer,
size_t  length 
)

receive and send data binary: do the same, but byte-swap if necessary length is still in bytes, %4 must be 0

int coSimLib::recvData ( void buffer,
size_t  length 
)

receive and send data binary: do only if you are sure...

void coSimLib::resetSimLib ( )

start the remote control server: 0=normal termination, -1 on error

reset all member fields for startup and re-start

reset everything that didn't come from covise.config User must take care that the simulation is killed someway!

int coSimLib::sendBS_Data ( void buffer,
size_t  _length 
)

send with swapping if necessary we swap back and forth here - expensive for large data

int coSimLib::sendData ( const void buffer,
size_t  length 
)
int coSimLib::setLocalHost ( const char *  hostname)

set local host: return -1 on error

int coSimLib::setParaMap ( int  isCell,
int  isFortran,
int  nodeNo,
int  length,
int32 nodeMap 
)

set the mapping from the module: takes over map, do not delete!!

set the mapping from the module

void coSimLib::setPorts ( int  min,
int  max 
)
int coSimLib::setTargetHost ( const char *  hostname)

set target/local host: return -1 on error (e.g. not found in nameserver)

set target host: return -1 on error

int coSimLib::setUserArg ( int  num,
const char *  data 
)

set a user startup argument: 0 <= num < 63

set a user startup argument

void covise::coSimLib::setVerbose ( int  level)
inline

set verbose level

int covise::coSimLib::simRequestExec ( )
inline

check whether simulation requested exec

void coSimLib::sockData ( int  sockNo)
virtual

Overload this if you register any ports.

overload these functions for your compute / quit / param Callbacks

Reimplemented from covise::coModule.

int coSimLib::startSim ( int  reattach = 0)

start the user's application and connect to it

Member Data Documentation

std::list<command_object *>* covise::coSimLib::command_objects
private
int32 covise::coSimLib::d_actNode
private
bool covise::coSimLib::d_byteswap
private
int32** covise::coSimLib::d_cellMap
private
int32 covise::coSimLib::d_command
private
uint32_t covise::coSimLib::d_localIP
private
uint32_t covise::coSimLib::d_maxPort
private
uint32_t covise::coSimLib::d_minPort
private
char* covise::coSimLib::d_name
private
int32 covise::coSimLib::d_numCells
private
int covise::coSimLib::d_numNodes
private
int covise::coSimLib::d_numStartup
private
int32 covise::coSimLib::d_numVert
private
struct covise::coSimLib::PortListElem * covise::coSimLib::d_portList
private
int covise::coSimLib::d_simExec
private
int covise::coSimLib::d_socket
private
char** covise::coSimLib::d_startup_label
private
const char** covise::coSimLib::d_startup_line
private
uint32_t covise::coSimLib::d_targetIP
private
uint32_t covise::coSimLib::d_usePort
private
char* covise::coSimLib::d_userArg[10]
private
int covise::coSimLib::d_verbose
private
int32** covise::coSimLib::d_vertMap
private
coChoiceParam* covise::coSimLib::p_StartupSwitch
protected
int covise::coSimLib::server_socket
private
std::list<command_object *>* covise::coSimLib::tmp_objects
private

The documentation for this class was generated from the following files: