params.py (4380:1cbb5d3e4288) params.py (4446:9f5df8033a44)
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

343class Counter(CheckedInt): cxx_type = 'Counter'; size = 64; unsigned = True
344class Tick(CheckedInt): cxx_type = 'Tick'; size = 64; unsigned = True
345class TcpPort(CheckedInt): cxx_type = 'uint16_t'; size = 16; unsigned = True
346class UdpPort(CheckedInt): cxx_type = 'uint16_t'; size = 16; unsigned = True
347
348class Percent(CheckedInt): cxx_type = 'int'; min = 0; max = 100
349
350class Float(ParamValue, float):
1# Copyright (c) 2004-2006 The Regents of The University of Michigan
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

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

343class Counter(CheckedInt): cxx_type = 'Counter'; size = 64; unsigned = True
344class Tick(CheckedInt): cxx_type = 'Tick'; size = 64; unsigned = True
345class TcpPort(CheckedInt): cxx_type = 'uint16_t'; size = 16; unsigned = True
346class UdpPort(CheckedInt): cxx_type = 'uint16_t'; size = 16; unsigned = True
347
348class Percent(CheckedInt): cxx_type = 'int'; min = 0; max = 100
349
350class Float(ParamValue, float):
351 pass
351 cxx_type = 'double'
352
353class MemorySize(CheckedInt):
354 cxx_type = 'uint64_t'
355 size = 64
356 unsigned = True
357 def __init__(self, value):
358 if isinstance(value, MemorySize):
359 self.value = value.value

--- 669 unchanged lines hidden ---
352
353class MemorySize(CheckedInt):
354 cxx_type = 'uint64_t'
355 size = 64
356 unsigned = True
357 def __init__(self, value):
358 if isinstance(value, MemorySize):
359 self.value = value.value

--- 669 unchanged lines hidden ---