1 # Copyright (C) 2010 Richard Lincoln
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 # Lesser General Public License for more details.
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, USA
17 from CIM14
.IEC61968
.Metering
.DeviceFunction
import DeviceFunction
19 class ComFunction(DeviceFunction
):
20 """Communication function of communication equipment or a device such as a meter.
23 def __init__(self
, amrRouter
='', twoWay
=False, amrAddress
='', *args
, **kw_args
):
24 """Initialises a new 'ComFunction' instance.
26 @param amrRouter: Communication ID number (e.g. port number, serial number, data collector ID, etc.) of the parent device associated to this AMR module. Note: If someone swaps out a meter, they may inadvertently disrupt the AMR system. Some technologies route readings from nearby meters through a common collection point on an electricity meter. Removal of such a meter disrupts AMR for numerous nearby meters.
27 @param twoWay: True when the AMR module can both send and receive messages. Default is false (i.e., module can only send).
28 @param amrAddress: Communication ID number (e.g. serial number, IP address, telephone number, etc.) of the AMR module which serves this meter.
30 #: Communication ID number (e.g. port number, serial number, data collector ID, etc.) of the parent device associated to this AMR module. Note: If someone swaps out a meter, they may inadvertently disrupt the AMR system. Some technologies route readings from nearby meters through a common collection point on an electricity meter. Removal of such a meter disrupts AMR for numerous nearby meters.
31 self
.amrRouter
= amrRouter
33 #: True when the AMR module can both send and receive messages. Default is false (i.e., module can only send).
36 #: Communication ID number (e.g. serial number, IP address, telephone number, etc.) of the AMR module which serves this meter.
37 self
.amrAddress
= amrAddress
39 super(ComFunction
, self
).__init
__(*args
, **kw_args
)
41 _attrs
= ["amrRouter", "twoWay", "amrAddress"]
42 _attr_types
= {"amrRouter": str, "twoWay": bool, "amrAddress": str}
43 _defaults
= {"amrRouter": '', "twoWay": False, "amrAddress": ''}