params.py (8902:75b524b64c28) params.py (8934:f467d4db555a)
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 625 unchanged lines hidden (view full) ---

634 self.value = bool(value)
635
636 def getValue(self):
637 return bool(self.value)
638
639 def __str__(self):
640 return str(self.value)
641
1# Copyright (c) 2012 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

--- 625 unchanged lines hidden (view full) ---

634 self.value = bool(value)
635
636 def getValue(self):
637 return bool(self.value)
638
639 def __str__(self):
640 return str(self.value)
641
642 # implement truth value testing for Bool parameters so that these params
643 # evaluate correctly during the python configuration phase
644 def __nonzero__(self):
645 return bool(self.value)
646
642 def ini_str(self):
643 if self.value:
644 return 'true'
645 return 'false'
646
647def IncEthernetAddr(addr, val = 1):
648 bytes = map(lambda x: int(x, 16), addr.split(':'))
649 bytes[5] += val

--- 982 unchanged lines hidden ---
647 def ini_str(self):
648 if self.value:
649 return 'true'
650 return 'false'
651
652def IncEthernetAddr(addr, val = 1):
653 bytes = map(lambda x: int(x, 16), addr.split(':'))
654 bytes[5] += val

--- 982 unchanged lines hidden ---