Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
z2m
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xAAL
Code
Go
z2m
Commits
93b78360
Commit
93b78360
authored
9 months ago
by
KERDREUX Jerome
Browse files
Options
Downloads
Patches
Plain Diff
Use a fix BaseAddr right now.. usefull for debug/test
parent
00778e4a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
devices.go
+1
-1
1 addition, 1 deletion
devices.go
gateway.go
+9
-3
9 additions, 3 deletions
gateway.go
with
10 additions
and
4 deletions
devices.go
+
1
−
1
View file @
93b78360
...
...
@@ -17,7 +17,7 @@ func setupDevice(dev *xaal.Device, bDevice *BridgeDevice) {
func
NewDevices
(
bDevice
*
BridgeDevice
)
{
// TODO: Handle errors
baseAddr
,
_
:=
uuid
.
RandomBase
(
8
)
baseAddr
:=
GetGW
()
.
baseAddr
ieeeAddr
,
_
:=
hexStringToInteger
(
bDevice
.
IeeeAddress
)
baseAddr
,
_
=
baseAddr
.
Add
(
int64
(
ieeeAddr
))
...
...
This diff is collapsed.
Click to expand it.
gateway.go
+
9
−
3
View file @
93b78360
package
main
import
"sync"
import
(
"sync"
"gitlab.imt-atlantique.fr/xaal/code/go/core/uuid"
)
type
gateway
struct
{
devices
[]
*
BridgeDevice
devices
[]
*
BridgeDevice
baseAddr
uuid
.
UUID
}
var
instance
*
gateway
...
...
@@ -11,7 +16,8 @@ var once sync.Once
func
GetGW
()
*
gateway
{
once
.
Do
(
func
()
{
instance
=
&
gateway
{}
baseAdrr
,
_
:=
uuid
.
FromString
(
"64eacb5a-8181-11ef-0000-000000000000"
)
instance
=
&
gateway
{
baseAddr
:
baseAdrr
}
})
return
instance
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment