MindBuffer / smode_laser_plugin

Smode plugin for sending streams to LASER projectors
2 stars 2 forks source link

Solve crash that occurs when DAC unexpectedly stops responding via TCP #19

Closed mitchmindtree closed 4 years ago

mitchmindtree commented 4 years ago

We're not yet handling the case where the TCP stream is disconnected for some reason e.g. network issues, the DAC is turned off, etc. Need to make sure we can handle this and provide some feedback to the user somehow.

francis-maes commented 4 years ago

we already did this in several devices. I can show you how it is handled in other cases. Note: Device has a "SuccessStatus" variable that enables to report disconnection errors

mitchmindtree commented 4 years ago

Thanks yes an example would be great!

mitchmindtree commented 4 years ago

Reminder for myself - see Device.h SuccessStatus.h:


  // Status
  const SuccessStatus& getStatus() const
    {return status;}
  SuccessStatus& getStatus()
    {return status;}

  void setStatusFromSmodeThread(const SuccessStatus& status);
  void setStatusFromOtherThread(const SuccessStatus& status);