-
Notifications
You must be signed in to change notification settings - Fork 6
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
Merged
Java rewrite #2
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
…es so client code is more readable
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.
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
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.