-
Notifications
You must be signed in to change notification settings - Fork 0
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
Refactoring, fixes and improvements #5
Merged
Merged
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
- New way of adding routes, makes it cleaner - Handlers per route type - Adding the concept of a BaseGateway for easy extending - Adding more tests
Big rework
Added more tests Added SDO read & write Added GetVersion Adding Set default network / node
Regrouped all configurators tests inside node_configurator_test Unexported configurators & creation because don't need to be created by user directly
- Moved different canopen functions in different modules inside of /pkg, which make things much clearer - Some modules like fifo, crc have been moved to /internal Changes : - Default EDS is now embedded in binary - Added a lot of helper functions for accessing private methods - Some unexported members have been re-exported to allow the usage between packages Currently not all tests have been re-established and some may be failing
Embedded SDO client in node
…ded a space in front of beginning of all comments Also some else { if {}} replaced by else if {} Append slices to same slice (change is sdo client and serialize)
Moved NMT config functions to heartbeat which is more appropriate.
Added documentation on OD.
…consumers never processed the timestamp Fixed : Error in uint cast of milliseconds in SetInternalTime of TIME because was using time.Since Fixed : When changing node to consumer for TIME, can frame was not properly subscribed to. Added : InternalTime which returns internal time Added : SetProducerIntervalMs to update producer interval Added : tests with multiple slave nodes to make sure that time sync works
Changed : Configurator objects are now pointers for convenience
… is accessed, even if already the case Added : nrt tests that detected this error
…as already been added
Changed : adding variable in OD returns entry, which is easier to use.
Changed : SYNC has an RxToggle getter Changed : moved TIME test to other node_test file
…e name as var, which caused errors
…o release lock before sending
…ontaining entries 1006 & 1007 are directly referenced in SYNC object. So add locking also Fixed : race conditions in RPDO, TPDO and extensions Fixed : deadlock in NMT when receiving own message Fixed : race conditions for heartbeats
…o to avoid sync.Mutex copies
…rent access between go routines. Especially true for PDOs for example, which update OD without SDO. Fixed : Wrong type in addPDO for subobj 4 "Reserved" Fixed : adding some locking in nodes to avoid race conditions Fixed : failing test because wrong value for obj 0x2002 Fixed : disabled some virtual CAN tests as they can fail for network reasons Fixed : Concurrent access in virtual CAN Changed : VariableList now has an array of pointers, for consistency Changed : Added subObj 3 & 4 in RPDO entries in default EDS ==> this also changed test in configurator to not error
Fixed : canopen_test now reworking Added : race issue in emcy
…PDOs needs to be called. Changed : Changed signature of AddRemoteNode ==> useLocal is now passed in StartPDOs Added : Added Local(id) and Remote(id) to get local respectively remote nodes previously added in the network Removed : removed redundant Read, Write call functions as these are already inside nodes
…sdo) Refactored : Simplified ReadEDS Changed : eds format handler also takes nodeId as argument
Feature : Add network.Scan to scan bus using SDO, added some tests for this Fixed : CANopen master example updated for new AddRemoteNode signature
Feature : Added some simple tests around add/create/remove node behavior
…omGeneric to encode from any type
…terface for sdo client, not working yet
Fixed : ReadRaw does not return EOF when finishing read Refactored : use camelCase for naming in common
Refactored : renamed some variables in sdo, removed unused vars
…. Don't defer in for loop.
Refactored : removed unnecessary type cast Command()
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.
Features :
Bug fixes :
Other :