1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.PCUTypes import PCUType, PCUTypes
5 from PLC.Auth import Auth
7 class DeletePCUType(Method):
11 Returns 1 if successful, faults otherwise.
18 PCUType.fields['pcu_type_id']
21 returns = Parameter(int, '1 if successful')
24 def call(self, auth, pcu_type_id):
25 pcu_types = PCUTypes(self.api, [pcu_type_id])
27 raise PLCInvalidArgument("No such pcu type")
29 pcu_type = pcu_types[0]
31 self.event_objects = {'PCUType': [pcu_type['pcu_type_id']]}