Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>When you initialize the sysStatus, you set it to SystemStatus.NullStatus, which I assume is a static SystemStatus instance. This assignment updates the sysStatus variable to point to the NullStatus object in memory - it does NOT make a copy of that object. When you set values through the sysStatus variable, it will update the same object pointed to by SystemStatus.NullSTatus, which is a static object shared by all instances. You may want to change this to a struct, or use a new SystemStatus() instead of pointing sysStatus to that static instance.</p> <p>EDIT: Below was my original answer...</p> <p>I suspect the key to your problem is here:</p> <blockquote> <p>The ParseSystemStatus function is called from an event handler that is triggered every time a UDP message is received</p> </blockquote> <p>All 3 of your instances are wired up to listen for the PacketReceived event. When the OnPacketReceived method is called and it triggers the event stored in PacketReceived, that will fire off <em>all</em> of the event handlers which are wired up to listen to it. That means the client_UnsolicitedMessageReceived method will be called individually for each instance of your class.</p> <p>In other words, the way your system is written now, you have 1 UDP server. Every time it receives a packet, it will notify every instance of SuccinctClass that the packet was received. If you want different behavior, you may have to come up with a way to specify which instance you really want to notify, or to detect from within an instance of SuccinctClass whether you really want to act on a particular packet or leave it up to another instance of the class.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload