% ]5 _8 \8 ~# L3 D9 H5 e* k4 d; W
@Parameter (displayName = "Measured Pressure", usageName = "measured pressure") $ G2 ]* h; c0 F0 b public double getMeasured pressure() {3 Z* V F& Z/ t3 H, u" R
return measured pressure! R" h: n6 x. O2 q4 x0 H5 n4 u
}) B; e% S0 {5 h3 U Y9 c
public void setMeasured pressure(double newValue) {) _2 H" @% a. {1 n1 B
measured pressure = newValue; _) o1 O6 V; ~% J
} % @# ]; z7 \2 Z; R0 W. d1 \ public double measured pressure = 0; t' E8 L: \% c z) o) p
2 O4 p3 S2 N$ H6 |+ R' I
/** 9 q+ L% _ e( e * 0 s9 O y, Q6 q2 z2 D0 R& c4 L * This value is used to automatically generate agent identifiers.3 G6 y7 C: z, T1 N: y$ S9 O
* @field serialVersionUID* f8 q. a0 L- G. ?( J
* 3 I5 R" C N/ v: A *// z0 {3 R7 C6 D# ]; T! q
private static final long serialVersionUID = 1L' y+ q |2 m- q4 R9 v1 \
, w/ [; O I+ v, f2 D0 w* r3 U
/** ) u0 }6 e& m: s4 i! D * . C+ p. k' } W * This value is used to automatically generate agent identifiers.% G; Z" o$ \8 ]8 w3 L
* @field agentIDCounter + m8 x% ^- K$ E *3 ?& A' e9 a+ }, W
*/6 L+ {- H# v9 r% f; y
protected static long agentIDCounter = 1" v# D! b# o3 D6 K* D
h- s+ Y; [# H t /** 2 M" |* C9 B2 }3 c *( h4 I. y9 T. Y. J. m
* This value is the agent's identifier.7 D" L" e& m: i
* @field agentID 8 y. S1 B) n% w, j& b/ U *8 R" a' L0 o" C; E
*/) x7 k* h( }2 P4 _0 Q/ K3 q# f7 n
protected String agentID = "GasNode " + (agentIDCounter++) . K4 w0 o7 O r8 Q" [( o' g , Y0 B' T% F0 t /** 3 O, \% e" X. n8 o* t* E( Y S * ) ^3 N" [0 q3 F f" R u* y) h* O * This is the step behavior.) u2 G# h! }9 c; J4 S
* @method step 0 @& a' C7 y. G8 V4 f9 w; k *; v$ M/ r, I( z9 ^8 l
*/ 6 H) N; f: ?# Z+ [. R) V \: o- j2 }0 k @Watch( $ S) J5 q& `2 j) i) s$ r/ \: E watcheeClassName = 'infrastructuredemo.GasNode',3 d4 ^* e* ^2 {9 J+ }7 b8 ]
watcheeFieldNames = 'pressure', . T+ o( [; P5 S8 P& r query = 'linked_from', Y \$ [: X: I, m0 j* {' J whenToTrigger = WatcherTriggerSchedule.LATER, - [2 w. M: T( T* q+ k) X scheduleTriggerDelta = 10d ! U3 P) Y2 o' @; B1 [$ g6 q5 x )% V& j G* n2 \) k' g/ T8 |( e
public def step(infrastructuredemo.GasNode watchedAgent) {7 K4 [# y2 g1 e8 P6 }
& ^( F2 P: F( G // Define the return value variable.4 K% k' o( ^: N; g! `6 }
def returnValue, X I, N$ G' J- Q! M( M2 f6 t7 ]