|
| | | | M E M _ I F H _ D A T A
| | | | | SOURCE: qdev_structures.txt 1.10 (15/08/2014) English struct mem_ifh_data
{
struct Message *id_me;
struct DosPacket *id_dp;
struct FileHandle *id_fh;
struct MsgPort id_mp;
struct MsgPort *id_mpp;
void *id_dataptr;
LONG id_datalen;
LONG id_datapos;
LONG id_datatrk;
LONG id_readlen;
LONG id_readpos;
LONG *id_datappos;
LONG *id_dataptrk;
LONG *id_readplen;
LONG *id_readppos;
LONG id_fd;
LONG id_res1;
LONG id_res2;
};
id_me - Message pointer used in the macros. Probably useless most of
the time, but quite helpful when debugging.
id_dp - Handy DosPacket pointer that handlers can use when extracting
the message.
id_fh - Very special FileHandle that defines the basics of this virtual
file.
id_mp - Artifficial message port that triggers private excpetion which
contains packet handler for this virtual file.
id_mpp - MsgPort pointer used in the macros. Aside from swapping message
port also useful when debugging.
id_dataptr
- Virtual file buffer pointer. This should point at the memory
that will be Read() or Write() affected.
id_datalen
- Virtual file buffer size.
id_datapos
- Depending on handler implementation this can be used to track
cursor pos., but can be used to do something totally different.
id_datatrk
- Depending in handler implementation this can be used to mark
end of buffer, but of course you may use it to do something
else.
id_readlen
- Reading can use its own variables, so this is the purpose, but
as stated above you may make other uses of it.
id_readpos
- Reading can have different cursor positioning if you like. This
member can be used the other way as well. It is up to you how
it all will be arranged.
id_datappos
- You may operate on pointers in the handler code rather than on
integers directly. This has some advantages, such as it is very
easy(id_datappos = &id_datapos) to hack on the virtual file. By
default tied to id_datapos.
id_dataptrk
- Same as above. By default tied to id_datatrk integer. One such
handler that uses these pointers is han_rollifh().
id_readplen
- Also a handy pointer that is tied to id_readlen integer.
id_readppos
- Same as above. By default tied to id_readpos integer.
id_fd - BPTR'ed id_fh.
id_res1 - Doubled/feedback dp_Res1 to have more comfort while assigning
new values that then get exported through dp_Res1.
id_res2 - Doubled/feedback dp_Res2 to have more comfort while assigning
new values that then get exported through dp_Res2.
| |
| | | | |
|