ok, now at least the structure is better
but there's still a problem with the new mechanism as the size of the data isn't put into the pipe. I need to fix tis before someone could really use it...
This commit is contained in:
parent
f0dcaa239f
commit
9af6f707eb
4 changed files with 52 additions and 39 deletions
|
@ -43,6 +43,8 @@ public:
|
|||
*/
|
||||
void write(const void *buffer, unsigned int nbytes);
|
||||
|
||||
ssize_t read(void *buffer, unsigned int nbytes);
|
||||
|
||||
/*!
|
||||
* Simply write one single byte into the pipe. This is a shortcut
|
||||
* if there's really no data to transport, but to activate the handler.
|
||||
|
@ -51,12 +53,12 @@ public:
|
|||
|
||||
private:
|
||||
void(*_handler)(const void *data, void *buffer, unsigned int nbyte);
|
||||
int fd_write;
|
||||
int fd_read;
|
||||
const void *data;
|
||||
int _fd_write;
|
||||
int _fd_read;
|
||||
const void *_data;
|
||||
|
||||
// allow construction only in BusDispatcher
|
||||
Pipe ();
|
||||
Pipe (void(*handler)(const void *data, void *buffer, unsigned int nbyte), const void *data);
|
||||
~Pipe () {};
|
||||
|
||||
friend class BusDispatcher;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue