Compare commits
1 Commits
532d96a9be
...
c9c6115bf3
Author | SHA1 | Date | |
---|---|---|---|
c9c6115bf3 |
@ -207,4 +207,19 @@ func (c *Client) SetModem(ctx context.Context, funcs ...protocol.SetModemOptions
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SetModem implements protocol.Operations.
|
||||||
|
func (c *Client) GetModemConfiguration(ctx context.Context) (any, error) {
|
||||||
|
_, ops, err := c.getProtocol(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.WithStack(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
config, err := ops.GetModemConfiguration(ctx)
|
||||||
|
if err != nil {
|
||||||
|
return nil, errors.WithStack(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
return config, nil
|
||||||
|
}
|
||||||
|
|
||||||
var _ protocol.Operations = &Client{}
|
var _ protocol.Operations = &Client{}
|
||||||
|
@ -63,5 +63,5 @@ type Operations interface {
|
|||||||
SetModem(ctx context.Context, funcs ...SetModemOptionsFunc) error
|
SetModem(ctx context.Context, funcs ...SetModemOptionsFunc) error
|
||||||
|
|
||||||
//GetModemConfiguration mobile data config
|
//GetModemConfiguration mobile data config
|
||||||
GetModemConfiguration(ctx context.Context, funcs ...SetModemOptionsFunc) (any, error)
|
GetModemConfiguration(ctx context.Context) (any, error)
|
||||||
}
|
}
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
package testsuite
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"forge.cadoles.com/cadoles/go-emlid/reach/client"
|
|
||||||
"forge.cadoles.com/cadoles/go-emlid/reach/client/protocol"
|
|
||||||
)
|
|
||||||
|
|
||||||
func TestReachOperations(t *testing.T) {
|
|
||||||
opsFactory := func(addr string) (protocol.Operations, error) {
|
|
||||||
return client.NewClient(addr), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
TestOperations(t, opsFactory)
|
|
||||||
}
|
|
@ -396,7 +396,7 @@ func (o *Operations) SetModem(ctx context.Context, funcs ...protocol.SetModemOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Deprecated : is no longer maintained for modules in V1
|
// Deprecated : is no longer maintained for modules in V1
|
||||||
func (o *Operations) GetModemConfiguration(ctx context.Context, funcs ...protocol.SetModemOptionsFunc) (*model.ModemAuthentication, error) {
|
func (o *Operations) GetModemConfiguration(ctx context.Context) (any, error) {
|
||||||
return nil, protocol.ErrUnimplemented
|
return nil, protocol.ErrUnimplemented
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -400,7 +400,7 @@ func (o *Operations) SetModem(ctx context.Context, funcs ...protocol.SetModemOpt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetModem implements protocol.Operations.
|
// SetModem implements protocol.Operations.
|
||||||
func (o *Operations) GetModemConfiguration(ctx context.Context, funcs ...protocol.SetModemOptionsFunc) (any, error) {
|
func (o *Operations) GetModemConfiguration(ctx context.Context) (any, error) {
|
||||||
config, err := o.GetModem(ctx)
|
config, err := o.GetModem(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, errors.WithStack(err)
|
return nil, errors.WithStack(err)
|
||||||
|
Reference in New Issue
Block a user