ASL Advanced Scripting Language Short ... - PublicSoft GmbH

vroomhuhSoftware and s/w Development

Nov 4, 2013 (3 years and 7 months ago)

95 views

ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 1
Solutions for your Success
ASL
Advanced Scripting Language Short Description Preliminary Information
V-2.13
Author:Achim Bernhardt
PublicSoft GmbH.
E-Mail:
ab@publicsoft.de
Internet:
www.publicsoft.de/asl
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 2
Solutions for your Success
ASL
Advanced Scripting Language Why ASL ?Programming is a complicated and time consuming process.
In addition it is prone to errors and not easy in finding defects.
Once the programming made easier, a larger number of applications
can be developed quickly and more secure.
ASLoffers the possibility to build secure and feature rich applications
in an extreme easy way without specific programming knowledge.
This ensures consistent and reliable error free applications.
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 3
Solutions for your Success
ASL
Advanced Scripting Language The Advantages of ASL Easy to learn
Easy to use
Easy to program
Extreme easy GUI programming
Greatest flexibility
Extendable capabilities
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 4
Solutions for your Success
ASL
Advanced Scripting Language The ASL Programming Environment Editor with syntax high lighting
Code folding
Auto code completion
Template support
Visual Debugger
Drag + Drop Support
GUI Dialog-Editor
grayed = under development or planed
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 5
Solutions for your Success
ASL
Advanced Scripting Language The Possibilities of ASL Interpreter, Compiler, Runtime
Available as EXE, LIB, DLL
Embedding in to other Applications
Import compiled Libraries
Runs on embedded Processing CPU
Real Time Processing capability
Execute embedded Code (C/C++, Python, PHP, etc.)
grayed = under development or planed
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 6
Solutions for your Success
ASL
Advanced Scripting Language Some of the ASL Features Variables global and local, static and dynamically
Dynamically organized arrays (!)
Hex, Octal, Binary and Bit operations
Shift-, AND, OR, exclusive OR operations
Trigonometric and Scientific math operations
Date and Time Calculation
Time and Event Synchronization grayed = under development or planed
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 7
Solutions for your Success
ASL
Advanced Scripting Language Specific ASL Features File Access: Binary, ASCII/CSV with fixed/variable records
GUI: Message Box,
Dialog, Menu
Graphic: XY, Strip, Waterfall,
Image, Video
Waveform: Sinus, Triangle, Square,
etc.
SW-Interface: Signals and Messages
(Signal Dictionary, ICD)
SW-Protocol: GPS,
TCP, UDP, LabVIEW, Agilent
HW-Protocol: RS-232, USB,
IEEE-488,Ethernet
grayed = under development or planed
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 8
Solutions for your Success
boolean
name [=
FALSE
|
TRUE
]
word
name [=value] // 16 Bit
integer
name [=value] // 32 Bit
long
name [=value] // 64 Bit
byte
name [=value] // 8 Bit
ASL
Language Elements Data Types
float
name [=value] // 32 Bit
double
name [=value] // 64 Bit
string
name [="text"]
integer =float
float =integer
numeric =string
string =numeric
string =enum
Casting
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 9
Solutions for your Success
Data
constant
name =value
enum
enum_type
begin
name [= value[
step
step]],...]
end
type
name[= value] // global + local
newtype
name [= value]// only local
[
static
]
type
name [= value]// only local
type
name[] [= v1, v2[,...]]// dynamic array
type
name[n][= v1, v2[,...]]// fixed array
type
name[n1, n2[,...]]// fixed multi dimensional array
structure
struct_type
begin
type
name
type
name[...]
...
end
constant
Variable
Array
Structure
ASL
Language Elements
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 10
Solutions for your Success
ASL
Language Elements Operators
=
* / % + 
< <= > >= == !=
&& || ^^ !
& | ^ ~ << >>
( ) ()[ ] [] . , ; " ' \// /* */
Assign
Arithmetic
Compare
Logical
Bitwise
Specific
string+string
String
begin
...
end
Block
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 11
Solutions for your Success
Functions
function
[
type
]name([arguments])
begin
statements
...
[
return
[rvalue]]
end
function
name(
type
data [,...])// default = in
function
name(
intype
data [,...])
function
name(
outtype
variable [,...])
function
name(
inouttype
variable [,...])
ASL
Language Elements
for
variable = start
to
final[
step
step]
statements
endfor
while
condition
statements
endwhile
repeat
statements
until
condition
LoopsArguments:
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 12
Solutions for your Success
if
condition
statements
elseif
condition
statements
elseif
condition
statements
else
statements
endif
switch
expression
case
condition_1
statements
case
condition_n
statements
default
statements
endswitch
Controls
ASL
Language Elements
while
condition // <----+
... // |
continue
// ----+ // continues a while, repeat, forloop
...
endwhile
while
condition
...
break
// ----+ // leaves a while,repeat,for,switchblock
... // |
endwhile
// |
... // <----+
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 13
Solutions for your Success
Pre Processor
//this is a line comment
include
"scriptfile.ASL"
/*
// this is a block comment
...
/*
...
// nested block comments allowed
...
*/
...
*/
ASL
Language Elements
import
"objectfile.ASLO"
#define
identifier // conditional compiling
#define
identifier substitute // text substitution
#define
identifier(args) substitute // macro definition
#undef
identifier
#ifdef
identifier
#ifndef
identifier
#if
expression
#elseif
expression
#else
#endif
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 14
Solutions for your Success
float =
Math.Sin
(radiant)
float =
Math.Sin_D
(degree)
float =
Math.Sin_S
(semicircle)
float =
Math.Cos
(radiant)
float =
Math.Cos_D
(degree)
float =
Math.Cos_S
(semicircle)
float =
Math.Tan
(radiant)
float =
Math.Tan_D
(degree)
float =
Math.Tan_S
(semicircle)
radiant=
Math.ArcSin
(number)
degree =
Math.ArcSin_D
(number)
semicircle=
Math.ArcSin_S
(number)
radiant=
Math.ArcCos
(number)
degree =
Math.ArcCos_D
(number)
semicircle=
Math.ArcCos_S
(number)
radiant=
Math.ArcTan
(number)
degree =
Math.ArcTan_D
(number)
semicircle=
Math.ArcTan_S
(number)
radiant=
Math.ArcTan2
(number, number)
degree =
Math.ArcTan2_D
(number, number)
semicircle=
Math.ArcTan2_D
(number, number)
float =
Math.Sqrt
(number)
float =
Math.Log
(number)
integer=
Math.Log_N
(float)
float =
Math.Exp
(number)
float =
Math.Power
(number,number)
float =
Math.Abs
(number)
integer=
Math.Floor
(float)
float =
Math.Fraction
(float)
integer=
Math.Ceil
(float)
integer=
Math.Round
(float)
ASL
Standard Library Math
1
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 15
Solutions for your Success
ASL
Standard Library Math
2
Math.Random
(num,min,max [, seed])
Math.Random
(newnum,srcnum)
float=
Math.Random
(num)
boolean=
Math.Evaluate
(val, ref, tol, "Absolute")
boolean=
Math.Evaluate
(val, ref, tol, "Percent")
boolean=
Math.Evaluate
(val,ref,tol, "LSB")
boolean=
Math.Evaluate
(val, low,high, "Range")
boolean=
Math.Evaluate
(val, ref)
string =
Data.Type
(variable)
integer =
Data.Size
(variable)
Data
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 16
Solutions for your Success
ASL
Standard Library String
1
string =
String.ToUpper
(string)
string =
String.ToLower
(string)
string =
String.ToHex
(string)
string =
String.FromHex
(string)
string =
String.CharFromNum
(num[, count])
integer=
String.NumFromChar
(char)
string =
String.HexFromInt
(integer[, count])
integer =
String.IntFromHex
(string)
string =
String.OctFromInt
(integer[, count])
integer =
String.IntFromOct
(string)
string =
String.BinFromInt
(integer[, count])
integer =
String.IntFromBin
(string)
string=
String.Int
(value, count)
string=
String.Flt
(value, count, decimal)
string=
String.Str
(string, count)
string =
String.Mask
(mask, value[, value]...])
string=
String.Part
(string, pos[, len])
String.Part
(string, pos[, len]) = string
string =
String.StripLeading
(string)
string =
String.StripTrailing
(string)
FormatConversionManipulation
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 17
Solutions for your Success
ASL
Standard Library String
2
integer=
String.Length
(string)
bool=
String.IsAlpha
(string) // Alphabetic (AZ, az)
bool=
String.IsAlphaNum
(string)// Alphanumeric (AZ, az, 09)
bool=
String.IsDigit
(string) // Decimal (09)
bool=
String.IsHex
(string) // Hexa (AF, af, 09)
bool=
String.IsOct
(string) // Octal (0-7)
bool=
String.IsBin
(string) // Binary (0 or 1)
bool=
String.IsUpper
(string) // Uppercase (AZ)
bool=
String.IsLower
(string) // Lowercase (az)
bool=
String.IsAscii
(string) // ASCII (0x000x7F)
bool=
String.IsControl
(string) // Control (0x000x1F,0x7F)
bool=
String.IsCsym
(string) // Letter, underscore, digit
bool=
String.IsGraph
(string) // Printable except space (0x20)
bool=
String.IsPrint
(string) // Printable incl. space (0x200x7E)
bool=
String.IsPunct
(string) // Punctuation
bool=
String.IsWhite
(string) // White space (0x090x0D, 0x20)
Attribute
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 18
Solutions for your Success
Date
date
name [= "<date>"]
(*) =
() = system date, (date) = given date"YYYY.MM.DD" or "DD.MM.YYYY"
string=
Date.Get
(*) // "YYYY.MM.DD"
string=
Date.GetReverse
(*) // "DD.MM.YYYY"
integer=
Date.GetDay
(*) // 1...28,29,30,31
integer=
Date.GetWeekDay
(*) //1...7
string=
Date.GetWeekDayShort
(*) //Mon...Sun
string=
Date.GetWeekDayLong
(*) // Monday...Sunday
integer=
Date.GetMonth
(*) // 1...12
string=
Date.GetMonthShort
(*) // Jan...Dec
string=
Date.GetMonthLong
(*) // January...December
integer=
Date.GetMonthEnd
(*) // 1...27,28,29,30
integer=
Date.GetMonthDays
(*) // 28,29,30,31
integer=
Date.GetYear
(*) // 0...9999
integer=
Date.GetYearDay
(*) // 1...365,366
integer=
Date.GetYearEnd
(*) // 365,364...0
integer=
Date.GetYearWeek
(*) // 1...53
integer=
Date.GetDaysToDate
(*) // 1...3652058
string=
Date.GetDateFromDays
(days) // "YYYY.MM.DD"
integer=
Date.Split
(*) // to
date.Year/Month/Day
string=
Date.Make
(year, month, day) // "YYYY.MM.DD"
string=
Date.Set
(*) // "YYYY.MM.DD"
string =
Date.SetDay
(date, day) // "
YYYY.MM.
DD"
string=
Date.SetMonth
(date, month) // "
YYYY.
MM
.DD
"
string =
Date.SetYear
(date, year) // "YYYY
.MM.DD
"
integer=
Date.Difference
(date1, date2) // 0...3652058
string=
Date.Calc
(date) +-
Date.Day
(days) +-
Date.Month
(months)
+-
Date.Year
(years) ...
ASL
Standard Library
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 19
Solutions for your Success
Time
ASL
Standard Library
time
name [= "<time>"]
string =
Time.Get
() // HH:MM:SS.msec
integer=
Time.GetHour
() // 0...23
integer=
Time.GetMinute
() // 0...59
float =
Time.GetSecond
() // 0...59.999
string=
Time.Set
(*) // "HH:MM:SS.mmm"
string=
Time.SetHour
(time, hour) // "HH
:MM:SS.mmm
"
string=
Time.SetMinute
(time, minute) // "
HH:
MM
:SS.mmm
"
string =
Time.SetSecond
(time, second) // "
HH:MM:
SS
.mmm
"
seconds=
Time.GetSecondsToTime
(*) // 0...86399
string=
Time.GetTimeFromSeconds
(seconds) // "HH:MM:SS.mmm"
integer=
Time.Split
(*) // to
time.Hour/Minute/Second
string=
Time.Make
(hour, minute, second) // "HH:MM:SS.mmm"
integer=
Time.Difference
(time1, time2) // 0...86399
string=
Time.Calc
(string) +-
Time.Second
(seconds)
+-
Time.Minute
(minutes)
+-
Time.Hour
(hours)...
integer =
Time.GetDays
() // or
time.Days
= days overrun
[float =]
Time.Start
()
float=
Time.Elapsed
()
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 20
Solutions for your Success
Console
ASL
Standard Library
Log.Write
(string[+string]...])
Log.WriteLine
([...])
Log.ConsoleEnable
()
Log.ConsoleDisable
()
Log
Console.Clear
()
Console.Write
(string[+ string]...])
Console.WriteLine
([...])
variable=
Console.Read
(string [, default])
variable=
Console.ReadLine
(string[, default])
Console.Enable
()
Console.Disable
()
Console.Minimize
()
Console.Maximize
()
Console.Hide
()
Console.Show
()
Console.Restore
()
Console.LogEnable
()
Console.LogDisable
()
System
System.Command
(cmd[, cmdline])
System.Beep
([frequency[, duration]])
System.Memory.Create
([name[, size]]) // shared memory...
System.Memory.Open/Close
([name])
System.Memory.Read/Write
([name,]offset, size, data)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 21
Solutions for your Success
File
ASL
Standard Library Script
Script.Pause
()
Script.Stop
() // Stop the Script Execution
Script.WaitUntil
(pollingcomparison)
Script.WaitTime
(milliseconds)
Script.WaitClock
("HH:MM:SS")
Script.WaitRunTime
(runtime)
runtime=
Script.GetRunTime
()
file
name=
use
'filename'
as
filetype
begin
[attribute= value] // attribute
...
type
name [format] // field variable
...
end
name=
File.Name
(file[, part])
status =
File.Status
([file])
File.Read
(file, operation)
File.Write
(file, operation)
File.Delete
(file, operation)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 22
Solutions for your Success
Dialog
ASL
GUI Library
Gui.Dialog
name [, title][, x,y[, xl, yl]
Text: \\\\\\\\\\
Numeric: [[[.[[],]]
Date/Time: DD.DD.DDDD ZZ:ZZ:ZZ
Button: ||||||||||
Gui.Dialog.Fields
field [=attror value [+ value][, ...]]
...
Gui.Dialog.Attribute
field =attror value [+ value][, ...]
...
Gui.Dialog.Execute
script
...
Gui.Dialog.End
Gui.Dialog.Attribute.Set
(name, field, attribute)
Gui.Dialog.Hide
(name)
Gui.Dialog.Show
(name)
Gui.Dialog.Call
(name)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 23
Solutions for your Success
Gui.Menu
name [, x, y]
Vertical
or
Horizontal
"title"
"item 1"valueor function
"-" // separator
...
"item n"
Gui.Menu.Execute
script
...
Gui.Menu.End
Menu
ASL
GUI Library
Gui.Message.Box
(title, message[, buttons[+ icons[+ special]]])
Message Box
Gui.Menu.Call
(name)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 24
Solutions for your Success
Plot
ASL
GUI Library
Gui.Plot.XY
([wait])
Gui.Plot.Strip
([wait])
Gui.Plot.Waterfall
([wait])
Gui.Plot.Attribute
(
TBD
)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 25
Solutions for your Success
Script
Script.CreateTimer
(interval)
Script.WaitTimer
()
Script.DeleteTimer
()
ScriptScriptScriptScript
SystemSystemSystemSystem
Wait
Create
Timer Intervals
Delete
ASL
Interface Library
Script.SyncInit
(rate)
Script.SyncWait
()
Script.SyncComplete
()
Script.SyncEnd
()
Script
synchronized task
Sync Scheduler
Init
Wait
Complete
End
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 26
Solutions for your Success
Signal
Concept
Measureand Stimulateis combined always with the Interface (Rig).
Readand Writeis combined always with the Buffer (Data).
Script
Write
Stimulate
Read
Measure
Interface
(Rig)
Buffer
ASL
Interface Library
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 27
Solutions for your Success
Signal
Declarations, Measure, Stimulate
signal
sig =
use
'signal_name'
signal
sig[]=
use
'signal_name'
rawvalue
name// 64 bit integer
rawdata
name[]// byte array (dynamically allocated)
ASL
Interface Library
ScriptSignal Measure / Read
Buffer
Interface (Rig)
Signal.Measure
(sig)
value
=
Signal.Read
(sig)
signal
signal
signal
signal
value
=
Signal.Measure
(sig)
value
= sig
ScriptSignal Stimulate / Write
Buffer
Interface (Rig)
Signal.Stimulate
(sig)
Signal.Write
(sig,
value
)
signal
signal
signal
signal
Signal.Stimulate
(sig,
value
)
sig=
value
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 28
Solutions for your Success
Signal
support
ASL
Interface Library
name=
Signal.Name
(sig[, part])
Signal.SetMode
(mode)
boolean=
Signal.Evaluate
(sig, ref, tol, "Absolute")
boolean=
Signal.Evaluate
(sig, ref, tol, "Percent")
boolean=
Signal.Evaluate
(sig,ref,tol, "LSB")
boolean=
Signal.Evaluate
(sig, low,high, "Range")
boolean=
Signal.Evaluate
(sig, ref)
value=
Signal.GetFirstIndex
(sig)
value=
Signal.GetLastIndex
(sig)
integer=
Signal.GetRawSize
(sig)
value=
Signal.GetInitValue
(sig)
value=
Signal.GetMinValue
(sig)
value=
Signal.GetMaxValue
(sig)
value=
Signal.GetBitMask
(sig)
access=
Signal.GetAccessMode
(sig)
integer=
Signal.GetEnumCount
(sig)
list[]=
Signal.GetEnumList
(sig)
string=
Signal.GetMeaningFromValue
(sig, value)
value=
Signal.GetValueFromMeaning
(sig, string)
scaled=
Signal.GetScaledFromRaw
(sig, rawvalue)
rawvalue=
Signal.GetRawFromScaled
(sig, scaled)
signaltype=
Signal.GetSignalType
(sig)
datatype=
Signal.GetDataType
(sig)
value=
Signal.GetPosition
(sig)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 29
Solutions for your Success
Measureand Stimulateis combined always with the Interface (Rig).
Readand Writeis combined always with the Buffer (Data).
Script
Buffer
Write
Stimulate
Read
Measure
Interface
(Rig)
signal
signal
signal
signal
signal
Message
Concept
ASL
Interface Library
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 30
Solutions for your Success
message
[msg]=
use
'message_name'
rawvalue
name// 64 bit integer
rawdata
name[]// byte array (dynamically allocated)
Message
Declaration, Measure
ASL
Interface Library
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 31
Solutions for your Success
Message
Stimulate, Support
ASL
Interface Library
Message.Copy
(srcMsg, dstMsg[, srcOffs, dstOffs, length])
Message.SetMode
(mode[, mode])
Message.InitData
(msg)
Message.ResetData
(msg)
name=
Message.Name
(name[, part])
integer=
Message.GetRawSize
(msg)
value=
Message.GetPosition
(msg, sig)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 32
Solutions for your Success
Audio
ASL
Interface Library
Audio.Attribute.Set
(name,
TBD
)
Audio.Attribute.Get
(name,
TBD
)
Audio.Capture
(
TBD
)
Audio.Show
(
TBD
)
Audio.Play
(file)
Audio.Measure
(
TBD
)
Audio.Stimulate
(
TBD
)
Audio.Record
(
TBD
)
Audio.Replay
(
TBD
)
ReplayMeasureCapture
Show
Record
Stimulate
Play
Script
Control
Analyze
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 33
Solutions for your Success
Audio
Specific
ASL
Interface Library
Audio.Speech.Init
(language[, pitch[, speed]])
Audio.Speech.Text
("text"[,file.wav])
Audio.Speech.File
(file.txt[,file.wav])
Audio.Morse.Init
(freq[, dot[, char[, word]]])
wpm =
Audio.Morse.Test
(duration)
Audio.Morse.Text
("text")
Audio.Morse.File
(file.txt)
Speech
Morse
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 34
Solutions for your Success
Wave
ASL
Interface Library
wave
name=
use
'
TBD
'
begin
<
TBD
attribute>
end
Script
ReplayMeasure
Record
Stimulate
Show
Script
ReplayMeasure
Record
Stimulate
Show
Control
Analyze
Wave.Attribute.Set
(name,
TBD
)
Wave.Attribute.Get
(name,
TBD
)
Wave.Show
(name,
TBD
)
Wave.Measure
(name,
TBD
)
Wave.Stimulate
(name,
TBD
)
Wave.Record
(name,
TBD
)
Wave.Replay
(name,
TBD
)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 35
Solutions for your Success
Video
ASL
Interface Library
Video.Attribute.Set
(name,
TBD
)
Video.Attribute.Get
(name,
TBD
)
Video.Capture
(name,
TBD
)
Video.Show
(name,
TBD
)
Video.Measure
(name,
TBD
)
Video.Stimulate
(name,
TBD
)
Video.Record
(name,
TBD
)
Video.Replay
(name,
TBD
)
ReplayMeasureCapture
Record
StimulateShow
Script
Control
Analyze
video
name=
use
'
TBD
'
begin
<
TBD
attribute>
end
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 36
Solutions for your Success
com
com=
use
'name'
as
RS232
with
baud, bits, parity, stop[, mode]
com
com=
use
'name'
as
RS232
begin
baudrate
= 9600
wordlen
= 8
parity
= 0
stopbits
= 0
mode
= 3
end
Com
Explicit
name =
Com.Name
(com)
Com.Open
(com[, baud, bits, parity, stop[, mode]])
Com.Read
(com, data[, len])
Com.Write
(com, data[, len])
Com.Close
(com)
boolean=
Com.IsOpen
(com
Com.Show
(com)
Com.LogConsole
(com, bool)
Com.LogFile
(com, bool)
Com.SetRTS
(com, bool)
Com.SetDTR
(com, bool)
boolean=
Com.GetRI
(com)
boolean=
Com.GetDSR
(com)
boolean=
Com.GetCTS
(com)
boolean=
Com.GetCD
(com)
ASL
Interface Library
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 37
Solutions for your Success
com
com=
use
'name'
as
USB
begin
TBD
end
USB
Explicit
ASL
Interface Library
name=
Usb.Name
(com)
Usb.Open
(com)
Usb.Read
(com)
Usb.Write
(com)
Usb.CloseRead
(com)
Usb.CloseWrite
(com)
Usb.SetInterface
(com,
TBD
)
Usb.SetCollection
(com,
TBD
)
TBD=
Usb.GetList
(com)
TBD=
Usb.GetInterface
(com)
TBD=
Usb.GetCollection
(com)
TBD=
Usb.GetReportLengths
(com)
TBD=
Usb.GetLibVersion
(com)
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 38
Solutions for your Success
Add.Script
name
as
type
Add.Script.Code
script code
Add.Script.End
// type=
chsScript
the C/C++-Like scripting language
//
cmmScript
the C/ECMA-Like scripting language
//
exwScript
the Euphoria scripting language
//
luaScript
the LUA scripting language
//
phpScript
the PHP scripting language
//
prfScript
the PROFAN scripting language
//
pywScript
the Python scripting language
//
slwScript
the SLwscripting language
// ... can be continued
Add.Script
ASL
Embedding Scripting Languages
function
example()
begin
Add.Script.Exec
(c_Hello)
end
Add.Script
c_Hello
as
chsScrip
t
Add.Script.Code
#include <stdio.h>
#include <conio.h>
int main()
{
printf("Hello World");
}
Add.Script.End
Example
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 39
Solutions for your Success
function
main()
begin
Console.Write
("Hello World")
end
Hello World
Program
Console
Example
Hello World
ASL
Advanced Scripting Language
ASL Advanced Scripting Language -(C) 2013 by PublicSoft GmbH. ASL-Short.ppt
Page 40
Solutions for your Success
ASL
Advanced Scripting Language Thank you for your Attention By the way...
Questions, Critics and Ideas always welcome.
Author:Achim Bernhardt
PublicSoft GmbH.
E-Mail:
ab@publicsoft.de
Internet:
www.publicsoft.de/asl