3 from PLC.Faults import *
4 from PLC.Method import Method
5 from PLC.Parameter import Parameter, Mixed
6 from PLC.Filter import Filter
7 from PLC.Events import Event, Events
8 from PLC.Auth import Auth
10 class GetEvents(Method):
12 Returns an array of structs containing details about events and
13 faults. If event_filter is specified and is an array of event
14 identifiers, or a struct of event attributes, only events matching
15 the filter will be returned. If return_fields is specified, only the
16 specified details will be returned.
23 Mixed([Event.fields['event_id']],
24 Filter(Event.fields)),
25 Parameter([str], "List of fields to return", nullok = True)
28 returns = [Event.fields]
30 def call(self, auth, event_filter = None, return_fields = None):
31 return Events(self.api, event_filter, return_fields)