269
TIDE and Tibbo BASIC User Manual
©2000-2008 Tibbo Technology Inc.
Checking Ethernet Status
read-only property tells you if the NIC is functioning properly.
read-only property tells you if there is a live Ethernet cable
plugged into the Ethernet port of your device, and, if yes, whether this is a
10BaseT or 100BaseT connection. The
event is generated
each time the link status changes:
sub
on_net_link_change
if
net.linkstate= PL_NET_LINKSTATE_NOLINK
then
'switch the RED LED on (just an example of what you could do)
pat.play(
"RRRRRRRRRRRRRRRR"
, YES)
else
'switch the GREEN LED on
pat.play(
"GGGGGGGGGGGGGGGG"
, YES)
end
if
end
sub
Notice, that the net.linkstate always reflects current link status, not the link at the
time of event generation.
Finally, there is a
event that is generated when internal RX
buffer of NIC overflows.
8.3.3.2
Properties, Methods, Events
This section provides an alphabetical list of all properties, methods, and events of
the net object.
.Mac R/O Property
Function:
Returns the MAC address of the Ethernet interface.
Type:
Dot-decimal string
Value Range:
Any valid MAC address, i.e. "0.1.2.3.4.5". Each device is
preset with individual MAC address during production.
See Also:
---
Details
BASIC application cannot change MAC address directly. The MAC is stored in the
EEPROM memory. This is the same memory used by the
object. On power-
up the MAC address is loaded from the EEPROM and programmed into the Ethernet
controller of the device. Stor object provides a way to change MAC address in the
EEPROM- see
for details.
271
271
271
272
380
380