Champ hotspot.
darcs-hash:20060311155219-68412-5c98010bacd8664b7fdc3abccc5b02a41cb5f597.gz
This commit is contained in:
parent
cf7c0b54bb
commit
df03450927
2 changed files with 16 additions and 0 deletions
|
@ -2661,6 +2661,17 @@ class BorneWifi(Machine):
|
|||
mac[-1] = "%0.2x" % (int(mac[-1], 16) + 2)
|
||||
return ":".join(mac)
|
||||
|
||||
def hotspot(self, new=None):
|
||||
""" Cette borne est-elle partagée avec l'ENS ? """
|
||||
if new == None:
|
||||
# Le schéma nous assure que ce champ existe toujours
|
||||
return self._data['hotspot'][0] == "TRUE"
|
||||
else:
|
||||
if new:
|
||||
self._set('hotspot', ['TRUE'])
|
||||
else:
|
||||
self._set('hotspot', ['FALSE'])
|
||||
|
||||
def canal(self, new=None, raw=False):
|
||||
""" Attribution ou visualisation du canal d'une borne wifi """
|
||||
if not new:
|
||||
|
|
|
@ -496,6 +496,11 @@ def machine_details(machine) :
|
|||
|
||||
# Borne wifi
|
||||
if isinstance(machine, BorneWifi):
|
||||
f += coul(u'Hotspot : ', 'gras')
|
||||
if machine.hotspot():
|
||||
f += 'oui\n'
|
||||
else:
|
||||
f += 'non\n'
|
||||
f += coul(u'Puissance : ','gras') + u"%4.d" % int(machine.puissance())
|
||||
f += coul(u'\tCanaux : ', 'gras') + machine.canal()
|
||||
f += coul(u'\tÉtat : ', 'gras')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue