Module Syntax.VarDecl

Declaration of the IEC variable

type t
type direction =
  1. | Input
  2. | Output

ExprVariable could be connected to input/output data flow of POU.

val direction_to_yojson : direction -> Yojson.Safe.t
type qualifier =
  1. | QRetain
  2. | QNonRetain
  3. | QConstant

Qualifier of IEC variable

val qualifier_to_yojson : qualifier -> Yojson.Safe.t
type attribute =
  1. | Var of qualifier option
  2. | VarOut of qualifier option
  3. | VarIn of qualifier option
  4. | VarInOut
  5. | VarExternal of qualifier option
  6. | VarGlobal of qualifier option
  7. | VarAccess of string
    (*

    access name

    *)
  8. | VarTemp
  9. | VarConfig of string * string * string
    (*

    fb name

    *)
val attribute_to_yojson : attribute -> Yojson.Safe.t
val create : ?ty_spec:derived_ty_decl_spec option -> VarUse.t -> t
val get_var : t -> VarUse.t
val get_var_name : t -> string
val get_var_ti : t -> TI.t
val set_qualifier_exn : t -> qualifier -> t

Set qualifier for variable. Raise an exception if this variable doesn't support qualifiers.

val set_attr : t -> attribute -> t

Set qualifier for variable. Raise an exception if this variable doesn't support qualifiers.

val get_attr : t -> attribute option
val set_direction : t -> direction -> t
val get_direction : t -> direction option
val set_located_at : t -> DirVar.t -> t
val get_located_at : t -> DirVar.t option
val set_ty_spec : t -> derived_ty_decl_spec -> t
val get_ty_spec : t -> derived_ty_decl_spec option
val set_was_init : t -> bool -> t
val get_was_init : t -> bool
val to_yojson : t -> Yojson.Safe.t