Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python
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
Python
Commits
9a69ff18
Commit
9a69ff18
authored
6 months ago
by
KERDREUX Jerome
Browse files
Options
Downloads
Patches
Plain Diff
Switch go slog
parent
331ec8fe
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
libs/schemas/xaal/schemas/devices_go.mako
+5
-3
5 additions, 3 deletions
libs/schemas/xaal/schemas/devices_go.mako
libs/schemas/xaal/schemas/head_go.txt
+4
-4
4 additions, 4 deletions
libs/schemas/xaal/schemas/head_go.txt
with
9 additions
and
7 deletions
libs/schemas/xaal/schemas/devices_go.mako
+
5
−
3
View file @
9a69ff18
...
...
@@ -22,8 +22,10 @@ func New${Name}(addr uuid.UUID) *xaal.Device {
value = 'nil'
if type_ == 'data = bool':
value = 'false'
elif type_ in ['data = uint',
'data = number'
]:
elif type_ in ['data = uint',]:
value = 0
elif type_ in ['data = number',]:
value = 0.0
elif unit in ['K']:
value = 0
elif unit in ['%','%EL','%RH','°']:
...
...
@@ -44,10 +46,10 @@ func New${Name}(addr uuid.UUID) *xaal.Device {
% if len(keys) != 0 :
${camel_meth} := func(args xaal.MessageBody) *xaal.MessageBody {
// Arguments: ${print_keys}
log.
Printf
("${camel_meth} method: ${meth}
args: %v\n
",
args)
s
log.
Info
("${camel_meth} method: ${meth}
", slog.Any("args
",args)
)
% else:
${camel_meth} := func(xaal.MessageBody) *xaal.MessageBody {
log.
Printf
("${camel_meth} method: ${meth}
\n
")
s
log.
Info
("${camel_meth} method: ${meth}")
% endif
return nil
}
...
...
This diff is collapsed.
Click to expand it.
libs/schemas/xaal/schemas/head_go.txt
+
4
−
4
View file @
9a69ff18
package
xaal
schemas
package schemas
import (
"log"
xaal "xAAL/xaal"
"log/slog"
"github.com/google/uuid"
"gitlab.imt-atlantique.fr/xaal/code/go/core/uuid"
"gitlab.imt-atlantique.fr/xaal/code/go/core/xaal"
)
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