Datasheet

Card-metoder
IoCardInit
static pwr_tStatus IoCardInit( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp)
IoCardClose
static pwr_tStatus IoCardClose( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp)
IoCardRead
static pwr_tStatus IoCardRead( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp)
IoCardWrite
static pwr_tStatus IoCardWrite( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp)
IoCardSwap
static pwr_tStatus IoCardSwap( io_tCtx ctx,
io_sAgent *ap,
io_sRack *rp,
io_sCard *cp,
io_eEvent event)
Method registration
The methods for a class have to be registered, so that you from the the method object in the class
description can find the correct functions for a class. Below is an example of how the methods
IoCardInit, IoCardClose and IoCardRead are registered for the class Ssab_AiuP.
pwr_dExport pwr_BindIoMethods(Ssab_AiuP) = {
pwr_BindIoMethod(IoCardInit),
pwr_BindIoMethod(IoCardClose),
pwr_BindIoMethod(IoCardRead),
pwr_NullMethod
};
Class registration
Also the class has to be registered. This is done in different ways dependent on whether the I/O
system is implemented as a module in the Proview base system, or as a part of a project.
Module in Proview base system
If the I/O system are implemented as a module in the Proview base system, you create a file
lib/rt/src/rt_io_'modulename'.meth, and list all the classes that have registered methods in
this file.