Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TangoParser
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Tango devices
Calculation
TangoParser
Commits
f7e852de
Commit
f7e852de
authored
Mar 18, 2022
by
PICHON
Browse files
Options
Downloads
Patches
Plain Diff
Correction of a cyclique redondancy.
parent
48d85029
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/TangoParser.ppt
+0
-0
0 additions, 0 deletions
doc/TangoParser.ppt
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
src/main/java/fr/soleil/tango/parser/AJepParser.java
+11
-9
11 additions, 9 deletions
src/main/java/fr/soleil/tango/parser/AJepParser.java
with
12 additions
and
10 deletions
doc/TangoParser.ppt
100644 → 100755
+
0
−
0
View file @
f7e852de
No preview for this file type
This diff is collapsed.
Click to expand it.
pom.xml
+
1
−
1
View file @
f7e852de
...
...
@@ -12,7 +12,7 @@
<groupId>
fr.soleil.deviceservers
</groupId>
<artifactId>
TangoParser
</artifactId>
<version>
3.3.
4
</version>
<version>
3.3.
5
</version>
<name>
TangoParser
</name>
<description>
TangoParser Device
</description>
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fr/soleil/tango/parser/AJepParser.java
+
11
−
9
View file @
f7e852de
...
...
@@ -2,6 +2,8 @@ package fr.soleil.tango.parser;
import
java.lang.reflect.Array
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.locks.Lock
;
...
...
@@ -73,7 +75,7 @@ public abstract class AJepParser {
*/
protected
BiMap
<
String
,
String
>
variables
=
HashBiMap
.
create
();
protected
final
List
<
AJepParser
>
variablesJep
;
protected
final
List
<
AJepParser
>
variablesJepToRead
=
new
ArrayList
<
AJepParser
>();
protected
final
Map
<
String
,
AJepParser
>
variablesJepToRead
=
new
HashMap
<
>();
protected
final
Lock
locker
=
new
ReentrantLock
();
protected
final
TangoSource
dataSource
;
protected
final
String
sourceName
;
...
...
@@ -200,7 +202,7 @@ public abstract class AJepParser {
// refresh tango attributes
dataSource
.
refresh
();
// refresh other variables
for
(
final
AJepParser
variable
:
variablesJepToRead
)
{
for
(
final
AJepParser
variable
:
variablesJepToRead
.
values
()
)
{
variable
.
refresh
(
lock
);
}
}
finally
{
...
...
@@ -211,10 +213,10 @@ public abstract class AJepParser {
}
/**
* Evaluate the expression with la
s
test values refreshed by
* Evaluate the expression with latest values refreshed by
* {@link #refresh(boolean)}
*
* @param lock true to use synchroni
s
ation. For using Parser in multi-threaded
* @param lock true to use synchroni
z
ation. For using Parser in multi-threaded
* environment.
* @return the result of evaluation
* @throws DevFailed
...
...
@@ -240,10 +242,10 @@ public abstract class AJepParser {
}
// get results for variables
for
(
final
AJepParser
variable
:
variablesJepToRead
)
{
for
(
final
AJepParser
variable
:
variablesJepToRead
.
values
()
)
{
final
Object
r
=
variable
.
getValue
(
lock
);
logger
.
debug
(
"get input variable {} = {}"
,
variable
,
r
);
jep
.
addVariable
(
variable
.
getName
(),
r
);
jep
.
addVariable
(
variable
.
getName
(),
fromStandardToJepType
(
r
)
);
}
Object
lastWriteResult
=
parse
(
name
,
expressions
);
lastWriteResult
=
fromJepToStandardType
(
lastWriteResult
);
...
...
@@ -288,7 +290,7 @@ public abstract class AJepParser {
for
(
final
AJepParser
jepReader
:
variablesJep
)
{
if
(
jepReader
.
getName
().
equals
(
symbolName
))
{
logger
.
debug
(
"add existing variable {}"
,
jepReader
.
getName
());
variablesJepToRead
.
add
(
jepReader
);
variablesJepToRead
.
put
(
jepReader
.
getName
(),
jepReader
);
founded
=
true
;
}
}
...
...
@@ -322,8 +324,8 @@ public abstract class AJepParser {
}
}
public
List
<
AJepParser
>
getDependantJepParserList
()
{
return
variablesJepToRead
;
public
Collection
<
AJepParser
>
getDependantJepParserList
()
{
return
variablesJepToRead
.
values
()
;
}
/**
...
...
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