Mayor McCheese
Explore posts from serversHelp with writing a command queueing system for a serial device
At one job we were working on a ticketing system and needed to interact with Ticketmaster over a serial interface. Even though we needed to interface with them, and the project would fail on both sides if we didn't, we'd still have to buy their docs for some unreasonable amount. They said we were free to reverse engineer them. That was fun.
135 replies
FileSystemWatcher Service
FileSystemWatcher needs to die in a fire. You might not receive updates from the OS if it's too busy, antivirus can cause issues, a number of other small cases. The events that FileSystemWatcher have need to be carefully understood. Including lifecycle.
Common file system operations might raise more than one event. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Likewise, some applications (for example, antivirus software) might cause additional file system events that are detected by FileSystemWatcher.
13 replies
Help with writing a command queueing system for a serial device
It's usually device specific and the protocols are well defined. Some devices share protocols like modbus, MIDI, etc. Some are very custom. Years ago I needed to send data to a robotic glass cutting knife and table which iirc used modbus. I've had to work with thermal printers a few times that were way off book.
135 replies
Help with writing a command queueing system for a serial device
The only real issue should be sending the proper data across the port, which the docs can describe how better than me, it's fairly straightforward to send data.
I'm pretty swamped these days, but if you hit trouble just post code or throw it in a repo and I'll take a look.
135 replies
Help with writing a command queueing system for a serial device
Also iirc serialport class only works with rs232 devices, so for other serial port devices you need a hardware adapter to go from rs232 to rs485. You can find inexpensive adapters. Depending on the version of .net System.IO.Ports.SerialPort is included or you need the nuget package https://www.nuget.org/packages/System.IO.Ports. realistically to communicate with a serial device you'll need to know the protocol, i.e baud rate, start / stop bit patterns, port numbers, etc. I don't normally open attachments on discord, if you want to paste code.
As for the command queuing system you can likely just use mediatr. https://github.com/jbogard/MediatR
135 replies