CO_PROCESS_CREATE
co_process co_process_create(const char *name,
co_function run,
int argc, ...);
Header Fileco.h DescriptionThis function creates a process. This function must be called from within the configuration function of your application. Arguments
The arguments for
co_process_create
are as
Return ValueA pointer to the created process. This return value may subsequently be used as an argument to the function co_process_config . NotesProcesses created using co_process_create represent specific instances of the specified run function. It is possible (and common) for co_process_create to be called repeatedly for the same process in order to create multiple instances of a run function. In simulation, this function prints an error message and terminates the application if it is called from outside the configuration function, or if the Application Monitor is being used and a name argument is not supplied (== NULL ). |
CO_REGISTER_CREATE
co_register co_register_create(const char *name,
co_type type);
Header Fileco.h DescriptionThis function creates a register object. This function must be called from within the configuration function of your application. Arguments
The arguments for
co_register_create
are as
Return ValueA pointer to the created register. This return value may subsequently be used as an argument to function co_process_create . It returns NULL and sets co_errno to CO_ENOERROR if the type argument is NULL . Notes
Register
|
CO_REGISTER_GETint32 co_register_get(co_register reg); Header Fileco.h DescriptionThis function reads the contents of a register. This function must be called from within a process run function. Arguments
The argument for
co_register_get
is as
Return ValueThe value of the register is returned as a 32-bit integer. If the register is wider than 32 bits, the least-significant 32 bits of data are returned as an integer. If the register is smaller than 32 bits, the integer value of the data in the register is returned. |
CO_REGISTER_PUT
void co_register_put(co_register reg,
int32 value);
Header Fileco.h DescriptionThis function puts a data value to a register object. This function must be called from within a process run function. Arguments
The arguments for
co_register_put
are as
Return ValueNone. NotesIf the register is wider than 32 bits, the data value is written into the least-significant bytes of the register and higher-order bytes are unchanged. If the register is smaller than 32 bits, the least-significant bytes of the value are written to the register until it is full. |