Packet Communications.
More...
Packet Communications.
The low level "packets" in the networking are sent and received here. They are classified into two sizes: Short or Long. This old packet layer interfaces to the raw serial communications. This code is DEPRECATED!
- See Also
- http://www.amuletsandarmor.com/AALicense.txt
The low level "packets" in the networking are sent and received here. They are classified into two sizes: Short or Long. This packet layer interfaces to the Direct Talk communications layer.
- See Also
- http://www.amuletsandarmor.com/AALicense.txt
PacketGet is the routine called to retrieve a packet from the currently active communications port. If no packet is found, a -1 is returned. If a packet is found, a 0 is returned.
- Parameters
-
p_packet | – Packet location to receive data. Note that you must have room allocated for a long packet in case either a long or a short packet is received. You will want to check the packet type if you do receive data. |
- Returns
- Resultant flag. A -1 means no packet was received. A 0 means a packet was found.
PacketSend sends either a short or a long packet out the current communications port.
- Parameters
-
p_packet | – packet to send. |
PacketSendAnyLength sends a packet of any size up to a long packet size out the active communications port.
- Parameters
-
p_anyPacket | – packet to send. |
- Returns
- 0 if packet sent, -1 if not sent
PacketSendLong sends a long packet of 80 characters out the currently active communications port.
- Parameters
-
p_longPacket | – Packet with data entry filled. The rest of the fields will be filled out. |
- Returns
- 0 if packet sent, -1 if not sent
PacketSendShort is called to small (about 16 byte) packets out the currently active communications port.
- Parameters
-
p_shortPacket | – Packet with data entry filled. The rest of the fields will be filled out. |
- Returns
- 0 if packet sent, -1 if not sent
PacketSetId sets the packet Id. THIS SHOULD ONLY BE CALLED FROM WITHIN CMDQUEUE.
- Parameters
-
p_packet | – Pointer to packet whose ID must be p_packet changed. |
packetID | – New ID to assign to the packet. |