You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unable to read values from outstation error : erminate called after throwing an instance of 'std::runtime_error' what(): Tried to call pure virtual function "ISOEHandler::Start" Aborted (core dumped) ?
#24
Open
Saleem344 opened this issue
Dec 30, 2020
· 0 comments
class SOEHandler(opendnp3.ISOEHandler):
"""
Override ISOEHandler in this manner to implement application-specific sequence-of-events behavior.
This is an interface for SequenceOfEvents (SOE) callbacks from the Master stack to the application layer.
"""
def __init__(self):
super(SOEHandler, self).__init__()
def Process(self, info, values):
"""
Process measurement data.
:param info: HeaderInfo
:param values: A collection of values received from the Outstation (various data types are possible).
"""
if (values.Count() == 4 and type(values) == opendnp3.ICollectionIndexedBinaryOutputStatus):
class BOSVisitor(opendnp3.IVisitorIndexedBinaryOutputStatus):
def __init__(self):
super(BOSVisitor, self).__init__()
def OnValue(self, indexed_instance):
print(indexed_instance.index, indexed_instance.value.value)
values.Foreach(BOSVisitor())
def Start(self):
# This is implementing an interface, so this function
# must be declared.
pass
def End(self):
# This is implementing an interface, so this function
# must be declared.
pass
if name == "main":
# app = TestMaster().run_master(cmd="i")
app = TestMaster().run_master(cmd="r")`
Output: ms(1609309568885) INFO manager - Starting thread (0) channel state change: OPENING ms(1609309568885) INFO tcpclient - Connecting to: 192.168.0.69 cmd--------------- r ms(1609309568889) INFO tcpclient - Connected to: 192.168.0.69 channel state change: OPEN ms(1609309568889) INFO master - Begining task: Disable Unsolicited ms(1609309568889) --AL-> master - C0 15 3C 02 06 3C 03 06 3C 04 06 ms(1609309568889) --AL-> master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 0 FUNC: DISABLE_UNSOLICITED ms(1609309568889) --AL-> master - 060,002 - Class Data - Class 1 - all objects ms(1609309568889) --AL-> master - 060,003 - Class Data - Class 2 - all objects ms(1609309568889) --AL-> master - 060,004 - Class Data - Class 3 - all objects ms(1609309568889) --TL-> master - FIR: 1 FIN: 1 SEQ: 0 LEN: 11 ms(1609309568889) --LL-> master - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 2 Length: 12 ms(1609309568895) <-LL-- tcpclient - Function: PRI_UNCONFIRMED_USER_DATA Dest: 2 Source: 1 Length: 10 ms(1609309568895) <-TL-- master - FIR: 1 FIN: 1 SEQ: 4 LEN: 4 ms(1609309568895) <-AL-- master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 0 FUNC: RESPONSE IIN: [0x10, 0x01] ms(1609309568895) WARN master - Task was explicitly rejected via response with error IIN bit(s): Disable Unsolicited ms(1609309568895) INFO master - Begining task: Startup Integrity Poll ms(1609309568895) --AL-> master - C1 01 3C 02 06 3C 03 06 3C 04 06 3C 01 06 ms(1609309568895) --AL-> master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 1 FUNC: READ ms(1609309568895) --AL-> master - 060,002 - Class Data - Class 1 - all objects ms(1609309568895) --AL-> master - 060,003 - Class Data - Class 2 - all objects ms(1609309568895) --AL-> master - 060,004 - Class Data - Class 3 - all objects ms(1609309568895) --AL-> master - 060,001 - Class Data - Class 0 - all objects ms(1609309568895) --TL-> master - FIR: 1 FIN: 1 SEQ: 1 LEN: 14 ms(1609309568895) --LL-> master - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 2 Length: 15 ms(1609309568907) <-LL-- tcpclient - Function: PRI_UNCONFIRMED_USER_DATA Dest: 2 Source: 1 Length: 16 ms(1609309568907) <-TL-- master - FIR: 1 FIN: 1 SEQ: 5 LEN: 10 ms(1609309568908) <-AL-- master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 1 FUNC: RESPONSE IIN: [0x10, 0x00] ms(1609309568908) <-AL-- master - 010,002 Binary Output - Output Status With Flags, 8-bit start stop [0, 0] terminate called after throwing an instance of 'std::runtime_error' what(): Tried to call pure virtual function "ISOEHandler::Start" Aborted (core dumped)
Thank you for your help.
The text was updated successfully, but these errors were encountered:
Hi,
I'm new to dnp3 I made a program to read values from outstation but I'm getting this error can anyone help me??
my code:
`from pydnp3 import asiodnp3, asiopal, opendnp3, openpal
import time
from visitors import *
FILTERS = opendnp3.levels.NORMAL | opendnp3.levels.ALL_COMMS
HOST = "192.168.0.69"
LOCAL = "0.0.0.0"
PORT = 20000
class TestMaster:
class VisitorIndexedBinaryOutputStatus(opendnp3.IVisitorIndexedBinaryOutputStatus):
def init(self):
super(VisitorIndexedBinaryOutputStatus, self).init()
self.index_and_value = []
class SOEHandler(opendnp3.ISOEHandler):
"""
Override ISOEHandler in this manner to implement application-specific sequence-of-events behavior.
if name == "main":
# app = TestMaster().run_master(cmd="i")
app = TestMaster().run_master(cmd="r")`
Output:
ms(1609309568885) INFO manager - Starting thread (0) channel state change: OPENING ms(1609309568885) INFO tcpclient - Connecting to: 192.168.0.69 cmd--------------- r ms(1609309568889) INFO tcpclient - Connected to: 192.168.0.69 channel state change: OPEN ms(1609309568889) INFO master - Begining task: Disable Unsolicited ms(1609309568889) --AL-> master - C0 15 3C 02 06 3C 03 06 3C 04 06 ms(1609309568889) --AL-> master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 0 FUNC: DISABLE_UNSOLICITED ms(1609309568889) --AL-> master - 060,002 - Class Data - Class 1 - all objects ms(1609309568889) --AL-> master - 060,003 - Class Data - Class 2 - all objects ms(1609309568889) --AL-> master - 060,004 - Class Data - Class 3 - all objects ms(1609309568889) --TL-> master - FIR: 1 FIN: 1 SEQ: 0 LEN: 11 ms(1609309568889) --LL-> master - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 2 Length: 12 ms(1609309568895) <-LL-- tcpclient - Function: PRI_UNCONFIRMED_USER_DATA Dest: 2 Source: 1 Length: 10 ms(1609309568895) <-TL-- master - FIR: 1 FIN: 1 SEQ: 4 LEN: 4 ms(1609309568895) <-AL-- master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 0 FUNC: RESPONSE IIN: [0x10, 0x01] ms(1609309568895) WARN master - Task was explicitly rejected via response with error IIN bit(s): Disable Unsolicited ms(1609309568895) INFO master - Begining task: Startup Integrity Poll ms(1609309568895) --AL-> master - C1 01 3C 02 06 3C 03 06 3C 04 06 3C 01 06 ms(1609309568895) --AL-> master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 1 FUNC: READ ms(1609309568895) --AL-> master - 060,002 - Class Data - Class 1 - all objects ms(1609309568895) --AL-> master - 060,003 - Class Data - Class 2 - all objects ms(1609309568895) --AL-> master - 060,004 - Class Data - Class 3 - all objects ms(1609309568895) --AL-> master - 060,001 - Class Data - Class 0 - all objects ms(1609309568895) --TL-> master - FIR: 1 FIN: 1 SEQ: 1 LEN: 14 ms(1609309568895) --LL-> master - Function: PRI_UNCONFIRMED_USER_DATA Dest: 1 Source: 2 Length: 15 ms(1609309568907) <-LL-- tcpclient - Function: PRI_UNCONFIRMED_USER_DATA Dest: 2 Source: 1 Length: 16 ms(1609309568907) <-TL-- master - FIR: 1 FIN: 1 SEQ: 5 LEN: 10 ms(1609309568908) <-AL-- master - FIR: 1 FIN: 1 CON: 0 UNS: 0 SEQ: 1 FUNC: RESPONSE IIN: [0x10, 0x00] ms(1609309568908) <-AL-- master - 010,002 Binary Output - Output Status With Flags, 8-bit start stop [0, 0] terminate called after throwing an instance of 'std::runtime_error' what(): Tried to call pure virtual function "ISOEHandler::Start" Aborted (core dumped)
Thank you for your help.
The text was updated successfully, but these errors were encountered: