godsfapi [v3.2.0] - Official Go Client Library for DSF
-
godsfapi
- Official ClientThis client has now been adopted as an official client and can from now on be found at
https://github.com/Duet3D/DSF-APIs/tree/master/godsfapiOriginal post below
First Release of
goduetapiclient
As some of you may be aware I am a huge fan of Go as a programming language. Now it took me a whole lot longer (to start with) to actually port the client from C#.NET to Go but now a first implementation is ready. It is not yet finished but since I wanted to get out my ObjectSkipper I will make this available already.
It can be found at https://github.com/wilriker/goduetapiclient.
Working
- CommandConnection
- InterceptConnection
- SubscribeConnection
Not working
The Machine Model is simply aImplemented now.map[string]interface{}
instead of a real object.- No documentation of the source yet
Differences
Since Go does work a bit different compared to C#.NET some things are not 100% identical, i.e. there is no implicit type conversion available in Go so there are
As<Type>()
conversion functions.Contributions
I am always very happy about any kind of contribution, be it comments, suggestions, Pull Requests or whatsoever here or over at GitHub.
-
Release v1.2.0
Matching to the release of DuetSoftwareFramework 1.2.x.x I have updated my client library for Go. This ports all changes and new features introduced in DSF 1.2.x.x over to my client.
Also source documentation has been added. This should make development easier.
As usual it can be found at GitHub Releases page.
-
Release 1.2.1
This minor release addresses some bugs, cleans up inconsistencies in the code and prepares for fields added to the
MachineModel
in DuetSoftwareFramework 1.2.3.1Bug fixes
- When
BaseResponse
did not contain aCodeResult
instance there was an error due to trying to convertnil
to a different type - Value-type conversion functions
AsFloat64()
and similar did fail if the underlying type was not exactly the same type instead of trying to convert compatible other numeric types NewCode()
did not initializeBaseCommand
Code.ShortString()
could have resulted in a nil dereference
Enhancements
- Added
HasParameter()
andIsMajorNumber()
convenience methods toCode
- Added methods to clone
Code
andCodeParameter
instances - New
Debug
field in all connection types to output sent and received data - Remove unused
SourceConnection
field from all commands butCode
- Changed
BaseConnection.ReceiveJson()
to return[]byte
and addedBaseConnection.ReceiveJSONString()
that returns astring
- When
-
Release 1.2.4
This is the final release of
godsfapi
v1 and is compatible with DSF up to version 1.2.4.Bug fixes
- Converting
CodeParameter
instances withAsUint64()
orAsUint64Slice()
could fail if the underlying numeric type was a negativeint64
value - When a connection to the socket was possible but no reading was possible (obscure permissions-problem) it would not return the error but
nil
instead MachineModel
structs were not correctly JSON-serialized to camelCase but PascalCase
- Converting
-
Release 2.1.0
This is a new major release of
godsfapi
that's compatible with Duet Software Framework 2.1.0 and later.Note that it is located at
github.com/Duet3D/DSF-APIs/godsfapi/v2
according to
go module
version conventions. If you want to upgrade you can use e.g. mod to assist you with import rewrites.This release has seen several major changes and thus is no longer compatible with DSF 1.2.4 and earlier.
Changes
package
structure undermachine
has been brought more in line with C# client - this means except forMachineModel
everything is in a new package now. Also most of thetype
s fromtypes
package have now been moved to either some sub-package ofmachine
orcommands
.MachineModel
and all related structs have been updated- All changes introduced with C# client have been ported over
-
Release 2.1.1
This is a minor release with the following contents
Changes
- Add
LaserPwm
toCurrentMove
- Add
Tools
andTrackedObjects
toLimits
and make all*int
to*int64
- Derive
IsExpression
inNewSimpleCodeParameter
Fixes
Code.Clone()
was not cloningCodeParameter
instances correctlyCodeParamterString()
was not correct ifCodeParameter.IsExpression
istrue
- Add
-
@wilriker Every time I see this thread, I wonder what the hell Gods' fapi is
-
@deckingman I stumble across that every once-in-a-while, too.
-
Release 2.1.1
Port changes from upstream
- Increase ProtocolVersion
- Add G53 to string output of commands that use it
- Adjust types in object model
- Add Skew to MoveCompensation
- Make IoBits in RestorePoint nilable
- Introduce SimpleFilamentMonitor
New
- Add a new Code.HasFlag() method to check for flags being set
-
Release 3.1.0
A new release that syncs all changes and the version number with DuetSoftwareFramework 3.1.0.
As witht the upgrade to version 2.x this has now been moved to
github.com/Duet3D/DSF-APIs/godsfapi/v3
and you can use e.g. mod to help to migrate your code.
-
Relese 3.1.1
This release adds
State BoardState
toBoards
Time
toState
in the OM.
It also increases
ProtocolVersion
to 8. -
Release 3.2.0
This release syncs with all changes from DSF 3.2.x and adds the previously missing
axis.drivers
property into the object model.