コード例 #1
0
ファイル: outstation.py プロジェクト: vitormhenrique/pydnp3
 def GetApplicationIIN(self):
     """Return the application-controlled IIN field."""
     application_iin = opendnp3.ApplicationIIN()
     application_iin.configCorrupt = False
     application_iin.deviceTrouble = False
     application_iin.localControl = False
     application_iin.needTime = False
     # Just for testing purposes, convert it to an IINField and display the contents of the two bytes.
     iin_field = application_iin.ToIIN()
     _log.debug('OutstationApplication.GetApplicationIIN: IINField LSB={}, MSB={}'.format(iin_field.LSB,
                                                                                          iin_field.MSB))
     return application_iin
コード例 #2
0
ファイル: outstation.py プロジェクト: singha42/gridappsd-dnp3
 def GetApplicationIIN(self):
     """Return the application-controlled IIN field."""
     application_iin = opendnp3.ApplicationIIN()
     application_iin.configCorrupt = False
     application_iin.deviceTrouble = False
     application_iin.localControl = False
     application_iin.needTime = False
     iin_field = application_iin.ToIIN()
     # Experiment with setting iin_field to an error value, e.g. configCorrupt to indicate that
     # a point couldn't be found in the Outstation's database.
     # Other interesting IIN values might be PARAM_ERROR, ALREADY_EXECUTING, FUNC_NOT_SUPPORTED.
     if iin_field.LSB != 0 or iin_field.MSB != 0:
         status_string = 'IINField LSB={}, MSB={}'.format(iin_field.LSB, iin_field.MSB)
         DNP3Outstation.get_agent().publish_outstation_status(status_string)
     return application_iin
コード例 #3
0
 def test_default_constructors(self):
     """
         Create the class object with default values for instance variable and test if the object is not empty.
     """
     assert asiodnp3.ConsoleLogger() is not None
     assert asiodnp3.DefaultListenCallbacks() is not None
     assert asiodnp3.DefaultMasterApplication() is not None
     assert asiodnp3.MasterStackConfig() is not None
     assert asiodnp3.PrintingChannelListener is not None
     assert asiodnp3.PrintingSOEHandler() is not None
     assert asiodnp3.UpdateBuilder() is not None
     assert asiopal.ChannelRetry() is not None
     assert asiopal.ResourceManager() is not None
     assert asiopal.SerialSettings() is not None
     assert asiopal.steady_clock_t() is not None
     assert opendnp3.AnalogCommandEvent() is not None
     assert opendnp3.AnalogOutputInt16() is not None
     assert opendnp3.AnalogOutputInt32() is not None
     assert opendnp3.AnalogOutputFloat32() is not None
     assert opendnp3.AnalogOutputDouble64() is not None
     assert opendnp3.BinaryCommandEvent() is not None
     assert opendnp3.ClassField() is not None
     assert opendnp3.ControlRelayOutputBlock() is not None
     assert opendnp3.DNPTime() is not None
     assert opendnp3.Flags() is not None
     assert opendnp3.GroupVariationID() is not None
     assert opendnp3.IndexedBinary() is not None
     assert opendnp3.IndexedDoubleBitBinary() is not None
     assert opendnp3.IndexedAnalog() is not None
     assert opendnp3.IndexedCounter() is not None
     assert opendnp3.IndexedFrozenCounter() is not None
     assert opendnp3.IndexedBinaryOutputStatus() is not None
     assert opendnp3.IndexedAnalogOutputStatus() is not None
     assert opendnp3.IndexedOctetString() is not None
     assert opendnp3.IndexedTimeAndInterval() is not None
     assert opendnp3.IndexedBinaryCommandEvent() is not None
     assert opendnp3.IndexedAnalogCommandEvent() is not None
     assert opendnp3.IndexedSecurityStat() is not None
     assert opendnp3.IndexedControlRelayOutputBlock() is not None
     assert opendnp3.IndexedAnalogOutputInt16() is not None
     assert opendnp3.IndexedAnalogOutputInt32() is not None
     assert opendnp3.IndexedAnalogOutputFloat32() is not None
     assert opendnp3.IndexedAnalogOutputDouble64() is not None
     assert opendnp3.Binary() is not None
     assert opendnp3.DoubleBitBinary() is not None
     assert opendnp3.BinaryOutputStatus() is not None
     assert opendnp3.Analog() is not None
     assert opendnp3.Counter() is not None
     assert opendnp3.FrozenCounter() is not None
     assert opendnp3.AnalogOutputStatus() is not None
     assert opendnp3.TimeAndInterval() is not None
     assert opendnp3.OctetData() is not None
     assert opendnp3.OctetString() is not None
     assert opendnp3.SecurityStat() is not None
     assert opendnp3.LinkHeaderFields() is not None
     assert opendnp3.LinkStatistics() is not None
     assert opendnp3.CommandSet() is not None
     assert opendnp3.HeaderInfo() is not None
     assert opendnp3.StartStopRangeUint8() is not None
     assert opendnp3.StartStopRangeUint16() is not None
     assert opendnp3.CountUint8() is not None
     assert opendnp3.CountUint16() is not None
     assert opendnp3.HeaderUnion() is not None
     assert opendnp3.Header() is not None
     assert opendnp3.MasterParams() is not None
     assert opendnp3.RestartOperationResult() is not None
     assert opendnp3.TaskConfig() is not None
     assert opendnp3.ApplicationIIN() is not None
     assert opendnp3.DatabaseSizes() is not None
     assert opendnp3.EventBufferConfig() is not None
     assert opendnp3.OutstationConfig() is not None
     assert opendnp3.OutstationParams() is not None
     assert opendnp3.StaticTypeBitField() is not None
     assert opendnp3.StackStatistics() is not None
     assert opendnp3.IINField() is not None
     assert openpal.ArrayBinaryConfig() is not None
     assert openpal.ArrayDoubleBitBinaryConfig() is not None
     assert openpal.ArrayAnalogConfig() is not None
     assert openpal.ArrayCounterConfig() is not None
     assert openpal.ArrayFrozenCounterConfig() is not None
     assert openpal.ArrayBOStatusConfig() is not None
     assert openpal.ArrayAOStatusConfig() is not None
     assert openpal.ArrayTimeAndIntervalConfig() is not None
     assert openpal.ArrayBuffer() is not None
     assert openpal.ArrayViewBinaryConfig() is not None
     assert openpal.ArrayViewDoubleBitBinaryConfig() is not None
     assert openpal.ArrayViewAnalogConfig() is not None
     assert openpal.ArrayViewCounterConfig() is not None
     assert openpal.ArrayViewFrozenCounterConfig() is not None
     assert openpal.ArrayViewBOStatusConfig() is not None
     assert openpal.ArrayViewAOStatusConfig() is not None
     assert openpal.ArrayViewTimeAndIntervalConfig() is not None
     assert openpal.ArrayViewBuffer() is not None
     assert openpal.Buffer() is not None
     assert openpal.RingBuffer16() is not None
     assert openpal.RSlice() is not None
     assert openpal.SecureBuffer() is not None
     assert openpal.SettableRSlice() is not None
     assert openpal.SettableWSlice() is not None
     assert openpal.StaticBuffer4() is not None
     assert openpal.StaticBuffer14() is not None
     assert openpal.StaticBuffer100() is not None
     assert openpal.StaticBuffer292() is not None
     assert openpal.WSlice() is not None
     assert openpal.MonotonicTimestamp() is not None
     assert openpal.TimeDurationBase() is not None
     assert openpal.TimeDuration() is not None
     assert openpal.UTCTimestamp() is not None
     assert openpal.LogFilters() is not None
     assert openpal.Logger() is not None
     assert openpal.SerializerBinary() is not None
     assert openpal.SerializerDoubleBitBinary() is not None
     assert openpal.SerializerBinaryOutputStatus() is not None
     assert openpal.SerializerAnalog() is not None
     assert openpal.SerializerCounter() is not None
     assert openpal.SerializerFrozenCounter() is not None
     assert openpal.SerializerAnalogOutputStatus() is not None
     assert openpal.SerializerTimeAndInterval() is not None
     assert openpal.SerializerAnalogOutputInt16() is not None
     assert openpal.SerializerAnalogOutputInt32() is not None
     assert openpal.SerializerAnalogOutputFloat32() is not None
     assert openpal.SerializerAnalogOutputDouble64() is not None