Files
mazegame/engine/doc/html/files/network/obsonet-h.html
T

152 lines
16 KiB
HTML

<!DOCTYPE html>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>obsonet.h</title><link rel="stylesheet" type="text/css" href="../../styles/main.css" /><script type="text/javascript" src="../../styles/main.js"></script><script type="text/javascript">NDLoader.LoadJS("Content", "../../styles/");</script></head>
<!-- Generated by Natural Docs, version 2.2 -->
<!-- saved from url=(0016)http://localhost -->
<body onload="NDLoader.OnLoad('Content');" class="NDPage NDContentPage">
<a name="Functions"></a><a name="Topic286"></a><div class="CTopic TGroup LC first">
<div class="CTitle">Functions</div>
</div>
<a name="ONET_Initialize"></a><a name="Topic287"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_Initialize</div>
<div id="NDPrototype287" class="NDPrototype"><div class="PSection PPlainSection">u8 ONET_Initialize()</div></div>
<div class="CBody"><p>ObsoNET searching routine.&nbsp; /!\ Must not be call from page 1.&nbsp; /!\ Must not be call before any other function from this module.</p></div>
</div>
<a name="ONET_GetSlot"></a><a name="Topic288"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetSlot</div>
<div id="NDPrototype288" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> u8 ONET_GetSlot()</div></div>
<div class="CBody"><p>Obtains the ObsoNET slot (or 0xFF is not found).</p><div class="CHeading">Return</div><p>Slot number.</p></div>
</div>
<a name="ONET_HasBIOS"></a><a name="Topic289"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_HasBIOS</div>
<div id="NDPrototype289" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> ONET_HasBIOS()</div></div>
<div class="CBody"><p>Check if ObsoNET card has a BIOS.</p><div class="CHeading">Return</div><p>TRUE if the card has a BIOS.</p></div>
</div>
<a name="ONET_Reset"></a><a name="Topic290"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_Reset</div>
<div id="NDPrototype290" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> ONET_Reset()</div></div>
<div class="CBody"><p>Initializes the ObsoNET card.</p></div>
</div>
<a name="ONET_GetVersion"></a><a name="Topic291"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetVersion</div>
<div id="NDPrototype291" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline const</span> u8* ONET_GetVersion()</div></div>
<div class="CBody"><p>Obtains the BIOS version.</p><div class="CHeading">Return</div><p>Pointer to the 3 bytes version number (major, minor, revision).</p></div>
</div>
<a name="ONET_GetPhysicalAddr"></a><a name="Topic292"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetPhysicalAddr</div>
<div id="NDPrototype292" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline const</span> u8* ONET_GetPhysicalAddr()</div></div>
<div class="CBody"><p>Obtains the ObsoNET physical address.</p><div class="CHeading">Return</div><p>Pointer to the 6 bytes MAC address.</p></div>
</div>
<a name="ONET_GetMACAddress"></a><a name="Topic293"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetMACAddress</div>
<div id="NDPrototype293" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline const</span> u8* ONET_GetMACAddress()</div></div>
<div class="CBody"><p>Obtains the ObsoNET physical address.&nbsp; See <a href="../../index.html#File:network/obsonet.h:ONET_GetPhysicalAddr" target="_top" onmouseover="NDContentPage.OnLinkMouseOver(event,292);" onmouseout="NDContentPage.OnLinkMouseOut(event);" >ONET_GetPhysicalAddr</a></p><div class="CHeading">Return</div><p>Pointer to the 6 bytes MAC address.</p></div>
</div>
<a name="ONET_GetStatus"></a><a name="Topic294"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetStatus</div>
<div id="NDPrototype294" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">bool</span> ONET_GetStatus()</div></div>
<div class="CBody"><p>Obtains the network connection status.</p><div class="CHeading">Return</div><p>TRUE if the network is connected.</p></div>
</div>
<a name="ONET_Activation"></a><a name="Topic295"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_Activation</div>
<div id="NDPrototype295" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 ONET_Activation(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">flag</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Activates or deactivates ObsoNET.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">flag<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Activation flag (ONET_ACTIVATE_GET, ONET_ACTIVATE_ON or ONET_ACTIVATE_OFF).</p></td></tr></table><div class="CHeading">Return</div><p>Current activation state if flag is ONET_ACTIVATE_GET.</p></div>
</div>
<a name="ONET_Activate"></a><a name="Topic296"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_Activate</div>
<div id="NDPrototype296" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> ONET_Activate()</div></div>
<div class="CBody"><p>Activates ObsoNET.</p></div>
</div>
<a name="ONET_Disactivate"></a><a name="Topic297"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_Disactivate</div>
<div id="NDPrototype297" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> ONET_Disactivate()</div></div>
<div class="CBody"><p>Deactivates ObsoNET.</p></div>
</div>
<a name="ONET_IsActivate"></a><a name="Topic298"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_IsActivate</div>
<div id="NDPrototype298" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">inline</span> <span class="SHKeyword">bool</span> ONET_IsActivate()</div></div>
<div class="CBody"><p>Check Activates or deactivates ObsoNET.</p><div class="CHeading">Return</div><p>TRUE if the card is activated.</p></div>
</div>
<a name="ONET_ReceptConfig"></a><a name="Topic299"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_ReceptConfig</div>
<div id="NDPrototype299" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 ONET_ReceptConfig(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">flag</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Configuration of the reception parameters.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">flag<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Reception flag (ONET_RECEPT_SMALL, ONET_RECEPT_BROADCAST, ONET_RECEPT_MULTICAST, ONET_RECEPT_ALL or ONET_RECEPT_GET).</p></td></tr></table><div class="CHeading">Return</div><p>Current configuration if flag is ONET_RECEPT_GET.</p></div>
</div>
<a name="ONET_SetReceptConfig"></a><a name="Topic300"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_SetReceptConfig</div>
<div id="NDPrototype300" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">inline</span> <span class="SHKeyword">void</span> ONET_SetReceptConfig(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8&nbsp;</td><td class="PName last">flag</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set Configuration of the reception parameters.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">flag<div class="CDLParameterType">u8</div></td><td class="CDLDefinition"><p>Reception flag (ONET_RECEPT_SMALL, ONET_RECEPT_BROADCAST, ONET_RECEPT_MULTICAST or ONET_RECEPT_ALL).</p></td></tr></table></div>
</div>
<a name="ONET_SetReceptConfig(2)"></a><a name="Topic301"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_SetReceptConfig</div>
<div class="CBody"><p>Get Configuration of the reception parameters.</p><div class="CHeading">Return</div><p>Current configuration.</p></div>
</div>
<a name="ONET_SetMulticastMask"></a><a name="Topic302"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_SetMulticastMask</div>
<div id="NDPrototype302" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> ONET_SetMulticastMask(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8*&nbsp;</td><td class="PName last">addr</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Set Configuration of the multicast mask.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">addr<div class="CDLParameterType">u8*</div></td><td class="CDLDefinition"><p>Address to write the mask to.</p></td></tr></table></div>
</div>
<a name="ONET_GetMulticastMask"></a><a name="Topic303"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetMulticastMask</div>
<div id="NDPrototype303" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">void</span> ONET_GetMulticastMask(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8*&nbsp;</td><td class="PName last">addr</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Get Configuration of the multicast mask.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">addr<div class="CDLParameterType">u8*</div></td><td class="CDLDefinition"><p>Address to read the mask from.</p></td></tr></table></div>
</div>
<a name="ONET_GetPacketInfo"></a><a name="Topic304"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetPacketInfo</div>
<div id="NDPrototype304" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">bool</span> ONET_GetPacketInfo(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">ONET_PacketInfo*&nbsp;</td><td class="PName last">info</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Obtains information about the oldest received packet.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">info<div class="CDLParameterType">ONET_PacketInfo*</div></td><td class="CDLDefinition"><p>Pointer to the packet information structure.</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if a packet is available.</p></div>
</div>
<a name="ONET_GetPacket"></a><a name="Topic305"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_GetPacket</div>
<div id="NDPrototype305" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters"><span class="SHKeyword">bool</span> ONET_GetPacket(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PType first">u8*&nbsp;</td><td class="PName last">addr</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Obtains the oldest captured incoming packet.</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">addr<div class="CDLParameterType">u8*</div></td><td class="CDLDefinition"><p>Address where to put the packet (0 to discard it).</p></td></tr></table><div class="CHeading">Return</div><p>TRUE if a packet has been obtained (or discarded).</p></div>
</div>
<a name="ONET_DiscardPacket"></a><a name="Topic306"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_DiscardPacket</div>
<div id="NDPrototype306" class="NDPrototype"><div class="PSection PPlainSection"><span class="SHKeyword">void</span> ONET_DiscardPacket()</div></div>
<div class="CBody"><p>Discard the oldest captured incoming packet.</p></div>
</div>
<a name="ONET_SendPacketSync"></a><a name="Topic307"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_SendPacketSync</div>
<div id="NDPrototype307" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 ONET_SendPacketSync(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType">u8*&nbsp;</td><td class="PName last">addr,</td></tr><tr><td class="first"></td><td class="PType">u16&nbsp;</td><td class="PName last">size</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Sends a packet to the network (Synchronous execution).</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">addr<div class="CDLParameterType"><span class="SHKeyword">const</span> u8*</div></td><td class="CDLDefinition"><p>Address of the packet to send.</p></td></tr><tr><td class="CDLEntry">size<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>Size of the packet.</p></td></tr></table><div class="CHeading">Return</div><p>Status of the transmission.</p></div>
</div>
<a name="ONET_SendPacketAsync"></a><a name="Topic308"></a><div class="CTopic TFunction LC">
<div class="CTitle">ONET_SendPacketAsync</div>
<div id="NDPrototype308" class="NDPrototype WideForm"><div class="PSection PParameterSection CStyle"><table><tr><td class="PBeforeParameters">u8 ONET_SendPacketAsync(</td><td class="PParametersParentCell"><table class="PParameters"><tr><td class="PModifierQualifier first"><span class="SHKeyword">const</span>&nbsp;</td><td class="PType">u8*&nbsp;</td><td class="PName last">addr,</td></tr><tr><td class="first"></td><td class="PType">u16&nbsp;</td><td class="PName last">size</td></tr></table></td><td class="PAfterParameters">)</td></tr></table></div></div>
<div class="CBody"><p>Sends a packet to the network (Asynchronous execution).</p><div class="CHeading">Parameters</div><table class="CDefinitionList"><tr><td class="CDLEntry">addr<div class="CDLParameterType"><span class="SHKeyword">const</span> u8*</div></td><td class="CDLDefinition"><p>Address of the packet to send.</p></td></tr><tr><td class="CDLEntry">size<div class="CDLParameterType">u16</div></td><td class="CDLDefinition"><p>Size of the packet.</p></td></tr></table><div class="CHeading">Return</div><p>Status of the transmission.</p></div>
</div>
<a name="ONET_GetSendStatus"></a><a name="Topic309"></a><div class="CTopic TFunction LC last">
<div class="CTitle">ONET_GetSendStatus</div>
<div id="NDPrototype309" class="NDPrototype"><div class="PSection PPlainSection">u8 ONET_GetSendStatus()</div></div>
<div class="CBody"><p>Obtains the status of the packet transmission.</p><div class="CHeading">Return</div><p>Status of the transmission.</p></div>
</div>
</body></html>