slaver0110
Member
- Joined
- Mar 21, 2011
- Messages
- 72
- Reaction score
- 2
- Points
- 6
In working on my StationTug I've been rifling through the Dragonfly code to get a feel for coding docking port management, and I came across oapiBroadcastMFDMessage.
In the Dragonfly code, the usage seems to make a call to the stock DockingMFD, and after playing around with it, when used in clbkDockEvent, oapiBroadcastMFDMessage seems to change the DockingMFD to another port.
(I could be wrong, wouldn't be the first time...)
In the OrbiterAPI Guide, all I can find is the function itself, without a description of how it's used:
"oapiBroadcastMFDMessage(int mode, int msg, void *data)"
Could anyone offer a little guidance on how this function is used, particularly in connection with DockingMFD?
Cheers, and thanx!!
ETA: All I can clearly see is that it sends a struct to the DockingMFD:
struct { OBJHANDLE hObj; int dock; } dockspec;
dockspec.hObj = mate;
dockspec.dock = remoteport = (dock ? 0 : -1);
oapiBroadcastMFDMessage(MFD_DOCKING, 0, (void*)&dockspec);
In the Dragonfly code, the usage seems to make a call to the stock DockingMFD, and after playing around with it, when used in clbkDockEvent, oapiBroadcastMFDMessage seems to change the DockingMFD to another port.
(I could be wrong, wouldn't be the first time...)
In the OrbiterAPI Guide, all I can find is the function itself, without a description of how it's used:
"oapiBroadcastMFDMessage(int mode, int msg, void *data)"
Could anyone offer a little guidance on how this function is used, particularly in connection with DockingMFD?
Cheers, and thanx!!
ETA: All I can clearly see is that it sends a struct to the DockingMFD:
struct { OBJHANDLE hObj; int dock; } dockspec;
dockspec.hObj = mate;
dockspec.dock = remoteport = (dock ? 0 : -1);
oapiBroadcastMFDMessage(MFD_DOCKING, 0, (void*)&dockspec);
Last edited: