Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java rewrite #2

Merged
50 commits merged into from
Sep 8, 2015
Merged

Java rewrite #2

50 commits merged into from
Sep 8, 2015

Conversation

ghost
Copy link

@ghost ghost commented Sep 8, 2015

Using the Java API as a reference, this is mostly a complete rewrite. This should provide more consistency between documentation and hopefully ease the maintenance burden.

Cory Todd and others added 30 commits August 28, 2015 07:22
There is no reason to use the 4.0 framework for this project. Remove any reference to 4.0 libraries and make
a 3.5 project. Also removed all unused includes.
This is to prevent messages from collecting on the input buffer. This helps during debugging if you are setting breakpoints
and stopping for more than 50ms at a time. Since to poll rate is so slow, this will not affect regular operation of the acceptor.

Also show how to capture the denomination during the OnEscrow event in the test app.
Add support for both escrow and non-escrow mode. Fix possible missed message state wear bill
could stay in escrow forever without hearing the stack/reject message. Cleaned up constructors and
added a bunch of ugly state variables.

TODO abstract out the state variable into another class and work from that to make things read easier.
This uses the serial port alternate and works fine on my system. YMMV. Be sure to grab the dll from http://sourceforge.net/projects/serialportnet/ and add it as a reference to the ApexValidator project. Remove
the using System.IO.SerialPort reference. Make sure that the OpenNETCF dll is in the same directory as your application that you are testing.
Implement StongPort as used in our internal applications
Add slf4net support instead of hardcoded logging or sys prints
Name all states in a States enum. Make the event names start with "is" for states and "on" for events.
Also, add a kill bool to the main loop thread so we can safely shutdown a port.
Add bill bank for data binding demo
Isolate PortException error types into their own enum
Add Currency Map interface - not sure what we're going to do with that yet
Reduce visibility of PortException since we're using it internally and not propagating to clients.
…urn the IsOpen property and document this behavior.
Made Events System.Flags since more than one may be active in a message
Remove System.Flags from States since only one state may be active at once
Updated test harness to use latest API
Comment and function arg name changes for clarity
Cleanup UI and prevent connecting to the acceptor twice
Fix event and state colors
Add bill bank total counter
Add readlock on StrongPort to prevent shutting down while reading. That would crash the app.
Cory Todd and others added 20 commits September 4, 2015 13:17
Split master and slave messages into their own list
Add escrow timeout feature
bug fix in master codex that was breaking the return command
Put each category of feature in its own file for easier reading
PreviousResponse should be previous state since it only holds the last reported state. Also, start the escrow timer
on first escrow message.
Update test app to use latest API
Update comments and documentation
…meone comes up with a better solution. I really feel that we need some sort of logging in the library due to the nature of comm ports.
CA2122 Fix
implment IDisposable since StrongPort uses unmanaged code
Hide reset button since the reset command is not working in the API
update test app to use latest event names
ghost pushed a commit that referenced this pull request Sep 8, 2015
@ghost ghost merged commit 68e690a into master Sep 8, 2015
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant