+ All Categories
Home > Documents > ASL Advanced Scripting Language - PublicSoft · ASL Advanced Scripting Language - (C) 2014 by...

ASL Advanced Scripting Language - PublicSoft · ASL Advanced Scripting Language - (C) 2014 by...

Date post: 19-Aug-2018
Category:
Upload: letuyen
View: 234 times
Download: 0 times
Share this document with a friend
40
ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 1 Solutions for your Success ASL Advanced Scripting Language Short Description Preliminary Information V-2.1401 Author: Achim Bernhardt PublicSoft GmbH. E-Mail: [email protected] Internet: www.publicsoft.de/asl
Transcript

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 1

Solutions for your Success

ASL Advanced Scripting Language

Short Description

Preliminary Information

V-2.1401

Author: Achim BernhardtPublicSoft GmbH.

E-Mail: [email protected]: www.publicsoft.de/asl

ASL Advanced Scripting Language - (C) 2014 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.

ASL offers 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) 2014 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) 2014 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) 2014 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) 2014 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) 2014 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) 2014 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 ElementsData Types

float name [= value] // 32 Bit

double name [= value] // 64 Bit

string name [= " text" ]

integer = floatfloat = integernumeric = stringstring = numericstring = enum

Casting

binary name[]

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 9

Solutions for your SuccessData

constant name = value

enum enum_type begin name [= value[ step step]],... ] end

type name [= value] // global + localnew type name [= value] // only local

[static ] type name [= value] // only local

type name [] [= v1, v2[,...]] // dynamic arraytype name [ n] [= v1, v2[,...]] // fixed arraytype name [ n1, n2[,...]] // fixed multi dimensional array

structure struct_typebegin

type nametype name[...]...

end

constant

Variable

Array

Structure

ASL Language Elements

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 10

Solutions for your Success

ASL Language ElementsOperators

=

* / % + –

< <= > >= == !=

&& || ^^ !

& | ^ ~ << >>

( ) () [ ] [] . , ; " ' \ // /* */

Assign

Arithmetic

Compare

Logical

Bitwise

Specific

string + stringString

begin...

end

Block

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 11

Solutions for your SuccessFunctions

function [type] name ( [arguments])begin

statements...[return [rvalue]]

end

function name ( type data [,... ]) // default = infunction name ( in type data [,... ])function name ( out type variable [,... ])function name ( inout type variable [,... ])

ASL Language Elements

for variable = start to final [step step]statements

endfor

while conditionstatements

endwhile

repeatstatements

until condition

Loops

Arguments:

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 12

Solutions for your Success

if conditionstatements

elseif conditionstatements

elseif conditionstatements

elsestatements

endif

switch expressioncase condition_1

statementscase condition_n

statementsdefault

statementsendswitch

Controls

ASL Language Elements

while condition // <----+... // |continue // ----+ // continues a while , repeat , for loop ...

endwhile

while condition...break // ----+ // leaves a while , repeat , for , switch block ... // |

endwhile // |... // <----+

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 13

Solutions for your SuccessPre 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) 2014 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 LibraryMath 1

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 15

Solutions for your Success

ASL Standard LibraryMath 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 16

Solutions for your Success

ASL Standard LibraryString 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)

Manipulation

Conversion

Format

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 17

Solutions for your Success

ASL Standard LibraryString 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, digitbool = String.IsGraph ( string) // Printable except space (0x20)bool = String.IsPrint ( string) // Printable incl. space (0x20–0x7E)bool = String.IsPunct ( string) // Punctuationbool = String.IsWhite ( string) // White space (0x09–0x0D, 0x20)

Request

Binarybinary = Binary.Part ( binary, pos[, len])Binary.Part ( binary, pos[, len]) = binary

binary = Binary.FromHex ( string)string = Binary.ToHex ( binary, pos[, len])binary = Binary.FromOct ( string)string = Binary.ToOct ( binary, pos[, len])binary = Binary.FromDec ( string)string = Binary.ToDec ( binary, pos[, len])binary = Binary.FromStr ( string)string = Binary.ToStr ( binary, pos[, len])

Manipulation

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 18

Solutions for your SuccessDate

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...7string = Date.GetWeekDayShort (*) // Mon...Sunstring = Date.GetWeekDayLong (*) // Monday...Sunday

integer = Date.GetMonth (*) // 1...12string = Date.GetMonthShort (*) // Jan...Decstring = Date.GetMonthLong (*) // January...Decemberinteger = Date.GetMonthEnd (*) // 1...27,28,29,30integer = Date.GetMonthDays (*) // 28,29,30,31

integer = Date.GetYear (*) // 0...9999integer = Date.GetYearDay (*) // 1...365,366integer = Date.GetYearEnd (*) // 365,364...0integer = Date.GetYearWeek (*) // 1...53

integer = Date.GetDaysToDate (*) // 1...3652058string = Date.GetDateFromDays ( days) // " YYYY.MM.DD"integer = Date.Split (*) // to date.Year/ Month/ Daystring = 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 19

Solutions for your SuccessTime

ASL Standard Library

time name [= "< time>" ]

string = Time.Get () // HH:MM:SS.msecinteger = Time.GetHour () // 0...23integer = Time.GetMinute () // 0...59float = 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...86399string = Time.GetTimeFromSeconds ( seconds) // " HH:MM:SS.mmm"integer = Time.Split (*) // to time.Hour/Minute/Secondstring = Time.Make ( hour, minute, second) // " HH: MM: SS.mmm"

integer = Time.Difference ( time1, time2) // 0...86399

string = Time.Calc (s tring) +- 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 20

Solutions for your SuccessConsole

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 ()

SystemSystem.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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 21

Solutions for your SuccessFile

ASL Standard Library

Script

Script.Pause ()Script.Stop () // Stop the Script Execution

Script.WaitUntil ( polling comparison)Script.WaitTime ( milliseconds) Script.WaitClock (" HH:MM:SS")

Script.WaitRunTime ( runtime) runtime = Script.GetRunTime ()

file name = use ' filename' as filetypebegin

[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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 22

Solutions for your SuccessDialog

ASL GUI Library

gui.dialog name [, title][, x, y[, xl, yl]Text: \\\\\\\\\\

Numeric: [[[.[[],]]Date/Time: DD.DD.DDDD ZZ:ZZ:ZZ

Button: ||||||||||gui.dialog.fieldsfield [= attr or value [+ value][, ... ]]...

gui.dialog.attributefield = attr or value [+ value][, ... ]...

gui.dialog.executescript...

gui.dialog.end

Gui.Dialog.SetAttribute ( name, field, attribute)Gui.Dialog.GetAttribute ( name, field[, attribute])Gui.Dialog.Hide ( name)Gui.Dialog.Show ( name)Gui.Dialog.Call ( name)

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 23

Solutions for your Success

gui.menu name [, x, y]Vertical or Horizontal" title"" item 1" value or function"-" // separator..." item n"

gui.menu.executescript...

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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 24

Solutions for your SuccessPlot

ASL GUI Library

Gui.Plot.XY ( [wait])Gui.Plot.Strip ( [wait])Gui.Plot.Waterfall ( [wait])Gui.Plot.SetAttribute ( TBD)Gui.Plot.GetAttribute ( TBD)

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 25

Solutions for your SuccessScript

Script.TimerCreate ( interval)Script.TimerWait ()Script.TimerDelete ()

ScriptScriptScriptScript

SystemSystemSystemSystem

WaitCreate

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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 26

Solutions for your SuccessSignal Concept

Measure and Stimulate is combined always with the Interface (Rig).

Read and Write is combined always with the Buffer (Data).

Script

Write

Stimulate

Read

Measure

Interface(Rig)Buffer

ASL Interface Library

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 27

Solutions for your SuccessSignal Declarations, Measure, Stimulate

signal sig = use ' signal_name' signal sig[] = use ' signal_name'

rawvalue name // 64 bit integerrawdata name[] // byte array (dynamically allocated)

ASL Interface Library

Script Signal Measure / Read

Buffer

Interface (Rig)

Signal.Measure ( sig)

value = Signal.Read ( sig) signal

signal signal

signalvalue = Signal.Measure ( sig)value = sig

Script Signal Stimulate / Write

Buffer

Interface (Rig)

Signal.Stimulate ( sig)

Signal.Write ( sig, value) signal

signal signal

signalSignal.Stimulate ( sig, value)sig = value

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 28

Solutions for your SuccessSignal 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 29

Solutions for your Success

Measure and Stimulate is combined always with the Interface (Rig).

Read and Write is 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 30

Solutions for your Success

message [msg] = use ' message_name'

rawvalue name // 64 bit integerrawdata name[] // byte array (dynamically allocated)

Message Declaration, Measure

ASL Interface Library

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 31

Solutions for your SuccessMessage 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 32

Solutions for your SuccessAudio

ASL Interface Library

Audio.SetAttribute ( name, TBD)Audio.GetAttribute ( name, TBD)Audio.Capture ( TBD)Audio.Show ( TBD)Audio.Play ( file)Audio.Measure ( TBD)Audio.Stimulate ( TBD)Audio.Record ( TBD)Audio.Replay ( TBD)

Replay

Measure

CaptureShow

Record

Stimulate

PlayScript

ControlAnalyze

ASL Advanced Scripting Language - (C) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 33

Solutions for your SuccessAudio 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 34

Solutions for your SuccessWave

ASL Interface Library

wave name = use ' TBD'begin

<TBD attribute>end

Script

Replay

Measure

Record

Stimulate

ShowScript

Replay

Measure

Record

Stimulate

Show

ControlAnalyze

Wave.SetAttribute ( name, TBD)Wave.GetAttribute ( 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 35

Solutions for your SuccessVideo

ASL Interface Library

Video.SetAttribute ( name, TBD)Video.GetAttribute ( 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)

Replay

Measure

Capture

Record

Stimulate

ShowScript

ControlAnalyze

video name = use ' TBD'begin

<TBD attribute>end

ASL Advanced Scripting Language - (C) 2014 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 RS232begin

baudrate = 9600wordlen = 8parity = 0stopbits = 0mode = 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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 37

Solutions for your Success

com com = use ' name' as USBbegin

TBDend

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) 2014 by PublicSoft GmbH. ASL-Short.ppt Page 38

Solutions for your Success

script.add name as typescript.add.code

script codescript.add.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 SLw scripting language// ... can be continued

Script.Add

ASL Embedding Scripting Languages

function example()begin

Script.Add.Exec (c_Hello)end

script.add c_Hello as chsScrip t script.add.code

#include <stdio.h>#include <conio.h>

int main(){

printf("Hello World");}

script.add.end

Example

ASL Advanced Scripting Language - (C) 2014 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) 2014 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 BernhardtPublicSoft GmbH.

E-Mail: [email protected]: www.publicsoft.de/asl


Recommended