Module prototypeslg :: Class PBDateTime
[hide private]
[frames] | no frames]

Class PBDateTime

source code

                  object --+    
                           |    
prototypes.BaseProtogenClass --+
                               |
                              PBDateTime

Handle six 2-byte UINTs: y, m, d, h, m, s

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
Class to handle the date/time format of 6 2-byte UINTs: y, m, d, h, m, s
source code
 
_update(self, args, kwargs) source code
 
readfrombuffer(self, buf)
Get our value from the buffer
source code
 
writetobuffer(self, buf)
Scribble ourselves to the buf
source code
 
packetsize(self)
Size in bytes
source code
 
getvalue(self)
Returns our underlying value if sensible (eg an integer, string or list) else returns self
source code

Inherited from prototypes.BaseProtogenClass: autologread, autologwrite, iscontainer, packetspan, update

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

Class to handle the date/time format of 6 2-byte UINTs: y, m, d, h, m, s

Parameters:
  • default - (Optional) Our default value
  • defaulttocurrenttime - (Optional) Default to the current date/time
Overrides: object.__init__

_update(self, args, kwargs)

source code 
Overrides: prototypes.BaseProtogenClass._update

readfrombuffer(self, buf)

source code 

Get our value from the buffer

Overrides: prototypes.BaseProtogenClass.readfrombuffer
(inherited documentation)

writetobuffer(self, buf)

source code 

Scribble ourselves to the buf

Overrides: prototypes.BaseProtogenClass.writetobuffer
(inherited documentation)

packetsize(self)

source code 

Size in bytes

Overrides: prototypes.BaseProtogenClass.packetsize

getvalue(self)

source code 

Returns our underlying value if sensible (eg an integer, string or list) else returns self

Overrides: prototypes.BaseProtogenClass.getvalue
(inherited documentation)