Baigudin Software avatar
Baigudin Software logo
home
ru region
en region

Class «osdrv::AbstractDriver»

Skeletal implementation of the Driver interface.

public: AbstractDriver();

Constructor.

public: virtual ~AbstractDriver();

Destructor.

public: virtual int32 close();

Close stream.

Returns:
error code or zero.

public: virtual int32 control(int32 command, const void* arg);

Device control command.

Parameters:
command — control command for device.
arg — pointer to any data.

Returns:
error code or zero.

public: virtual int32 open(int32 access);

Open stream.

Parameters:
access — access to stream.

Returns:
error code or zero.

public: virtual int32 read(void* buf, int32 size);

Stream read from device.

Parameters:
buf — pointer to memory.
size — size in byte.

Returns:
count of reading bytes or -1 if error.

public: virtual int32 write(void* buf, int32 size);

Stream write to device

Parameters:
buf — pointer to memory.
size — size in byte.

Returns:
count of writing bytes or -1 if error.

Back to class list