Appendix B

Valid Control Widget href functions

Table 1. Control Widget href functions.

Amulet:back()

Returns to calling page.

Amulet:calibrate()

Runs touchscreen calibration, returns to calling page when calibration completed. Calibration constants are then saved to serial data flash. There is a 100,000 max write limit on the life of the serial data flash. After 10,000 writes, the Amulet OS and the user's project should be reprogrammed to maintain data integrity.

Amulet:clearLCD()

Clears the entire LCD.

Amulet:fileNumber(x)

Hyperlink to the file whose internal index is x. See Amulet link map file documentation for more information.

Amulet:internal.setCalPOC()

Sets the software calibration bit in the flash memory. Causes Amulet to go in calibration mode upon a soft or hard reset. Bit is cleared after succesful calibration.

Amulet:internalRAM.byte(z)2.method(x)1

Performs the named Internal RAM byte method. See Internal RAM documentation for list of available methods.

Amulet:internalRAM.clearRPCBuf()

Clears the internalRAM RPC buffer.

Amulet:internalRAM.invokeRPC(x)1

Adds the RPC number, x, to the internalRAM RPC buffer.

Amulet:internalRAM.saveToFlash()

Saves the current state of all the Internal RAM variables (byte, word and string) in the serial data flash. There is a 100,000 max write limit on the life of the serial data flash. After 10,000 writes, the Amulet OS and the user's project should be reprogrammed to maintain data integrity.

Amulet:internalRAM.string(z)2.method(x)1

Performs the named Internal RAM string method. See Internal RAM documentation for list of available methods.

Amulet:internalRAM.word(z)2.method(x)1

Performs the named Internal RAM word method. See Internal RAM documentation for list of available methods.

Amulet:loadFlash(back)

Used internally to halt all current activity and await flash programming commands from the Amulet HTML compiler. Performs Amulet:back() upon exit.

Amulet:loadFlash(reset)

Used internally to halt all current activity and await flash programming commands from the Amulet HTML compiler. Performs software reset upon exit.

Amulet:loadFlash(return)

Used to halt all current activity and await flash programming commands. Stays in same uHTML page upon exit.

Amulet:NOP()

Non-operational function; does nothing.

Amulet:screenDump()

Causes Amulet to jump to the screenDump page embedded in the OS files. ScreenDump page uploads the image on the LCD in the Amulet Bitmap Format using the xmodem with crc protocol.

Amulet:SPI(z).byteOut(x)1

Sends a raw byte x out the SPI bus while taking Amulet SPI slave select line z low. Put x in single quotes to be treated as an ASCII character. (i.e. '9' is equal to 0x39)

Amulet:togglePolarity()

Toggles the display polarity of the LCD between positive and negative. Once toggled, the state of the polarity is saved in the flash. Need to reload a page to see the resultant change of polarity.

Amulet:UART.byteOut(x)1

Sends out a raw byte x. Put x in single quotes to be treated as an ASCII character. (i.e. '9' is equal to 0x39)

Amulet:UART.invokeRPC(x)1

Sends out the invokeRPC command over the UART, with x being the RPC number.

Amulet:UART.byte(z)2.setValue(x)1

Sends out the setByte command over the UART, where z is the byte variable number, and x is the value to set it to.

Amulet:UART.string(z)2.setValue(x)1

Sends out the setString command over the UART, where z is the string variable number, and x is the string to set it to.

Amulet:UART.word(z)2.setValue(x)1

Sends out the setWord command over the UART, where z is the word variable number, and x is the value to set it to.

filename.html

Hyperlink to the file filename.html.

1. Regarding x: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. Anchors, META REFRESH tags, area maps and Function/Custom Buttons should use x. The range for x is 0-255 (0x00-0xff) for a BYTE, 0-65535 (0x00-0xffff) for a WORD and 250-character strings in double quotes for STRINGs.

2. Regarding z: When using the setValue(z) method, z is the variable number. The value to set variable z to is determined by either the intrinsic value of  the Control Widget or the value in x.


Table 2. Control Widget href functions for Inter-Widget Communications (IWC).

Amulet:document.widgetName.buttonDown()

The named Function/Custom Button Widget will appear as if it is currently being touched.

Amulet:document.widgetName.buttonUp()

The named Function/Custom Button Widget will appear as if it is currently NOT being touched.

Amulet:document.widgetName.clearCanvas()

The named Scribble/Dynamic Image Widget clears its canvas, including any background images.

Amulet:document.widgetName.disappear()

The named widget will clear itself from the LCD; if it is a View Widget it will also stop updating.

Amulet:document.widgetName.forceHit()

The named Control Widget will act as if it was "hit".

Amulet:document.widgetName.forceRefresh()

The named View Image Sequence Widget will paint the image at the next update, even if the incoming value is the same as the current state. Useful if an anchor is used around an Image Sequence Widget.

Amulet:document.widgetName.forceUpdate()

The named View Widget will act as if it's update rate time was activated. Allows for asynchronous updating.

Amulet:document.widgetName.inverseRegionColor()

The named widget will display in reverse video.

Amulet:document.widgetName.inverseStringColor()

The named widget's text string will display in reverse video.

Amulet:document.widgetName.nextEntry()

The named List widget will move its highlighted bar down to the next entry. Does not perform a "hit" on the new entry.

Amulet:document.widgetName.normalRegionColor()

The named widget will display in normal video.

Amulet:document.widgetName.normalStringColor()

The named widget's text string will display in normal video.

Amulet:document.widgetName.previousEntry()

The named List widget will move its highlighted bar up to the previous entry.  Does not perform a "hit" on the new entry.

Amulet:document.widgetName.reappear()

The named widget will reappear on the LCD in its original location; if it is a View Widget it will also start updating.

Amulet:document.widgetName.reset()

The named widget will initialize internal variables and re-draw.

Amulet:document.widgetName.setMethod(m)2

The href method for the named widget will change to m, where m is the method name. (such as value() or disappear())

Amulet:document.widgetName.setOnVarMethod(m)2

The ONVAR method for the named widget will change to m, where m is the method name. (such as value() or disappear())

Amulet:document.widgetName.setOnVarUARTMethod(m)2

The ONVAR UART method for the named widget will change to m, where m is the method name. (such as Value())

Amulet:document.widgetName.setOnVarVariableNumber(x)1

The variable number used in the ONVAR of the named widget will change to x, where x is the variable index used in the following variable types: byte(x), word(x) or string(x).

Amulet:document.widgetName.setTrigger(x)1

The named Widget will change its trigger, trigger.gt or trigger.lt value to the byte value x.

Amulet:document.widgetName.setUARTMethod(m)2

The href UART method for the named widget will change to m, where m is the UART:method name. (such as Value())

Amulet:document.widgetName.setUpdateRate(f)3

The update rate for the named widget will change to f, where f is a floating point number that represents the update rate in seconds.

Amulet:document.widgetName.setValue(x)1

The named widget will receive the intrinsic value of the calling widget, where x is the intrinsic value.

Amulet:document.widgetName.setVariableNumber(x)1

The variable number used in the href of the named widget will change to x, where x is the variable index used in the following variable types: byte(x), word(x) or string(x).

Amulet:document.widgetName.setX4(x)

The named Widget will change its topleft x coordinate to the word value x.

Amulet:document.widgetName.setY4(x)

The named Widget will change its topleft y coordinate to the word value x.

Amulet:document.widgetName.startUpdating()

The named View Widget will start updating the displayed data.

Amulet:document.widgetName.stopUpdating()

The named View Widget will stop updating the displayed data.

Amulet:document.widgetName.toggleRegionColor()

The named widget will either start or stop displaying in reverse video.

Amulet:document.widgetName.toggleStringColor()

The named widget's text string will either start or stop displaying in reverse video.

Amulet:document.widgetName.toggleUpdating()

The named View Widget will either start or stop updating the displayed data.

1. Regarding x: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. Anchors, META REFRESH tags, area maps and Function/Custom Buttons should use x. The range for x is 0-255 (0x00-0xff) for a BYTE, 0-65535 (0x00-0xffff) for a WORD and 250-character strings in double quotes for STRINGs.

2. Regardingm - When setMethod(),setOnVarMethod(),setOnVarUARTMethod() or setUARTMethod(), is the IWC method, the argument should be the name of the method you want to set. i.e. disappear() or byte.value(). Notice when dealing with a method that relies on a type (byte, word or string) you need to include the type separated by a dot and then the method (i.e. word.value()) instead of just the method by itself. See example regarding setMethod().

3. Regarding f: For Control Widgets that have intrinsic values, such as lists and sliders, leave the argument field empty, since the intrinsic value of the selection will be sent out. Anchors, META REFRESH tags, area maps and Function/Custom Buttons should use f. Like the regular updateRate, use a floating point number to specify the update rate in seconds. Range for f is 0-655.35

4. Regarding setX and setY: These methods should most always be preceded by a disappear() method and followed by a reappear() method. The setting of the x and y coordinates are independent of the removal of the widget in the old coordinates and the displaying in the new coordinates. See example regarding setX().


 Table 3. Control Widget href functions for inter-widget communications with animated GIFs.

Amulet:document.imageName.oneFrame()

The named image advances one frame.

Amulet:document.imageName.fastSpeed()

The named image animates quickly.

Amulet:document.imageName.pause()

The named image stops animating.

Amulet:document.imageName.play()

The named image starts animating in current direction.

Amulet:document.imageName.playBackwards()

The named image starts animating backwards.

Amulet:document.imageName.playForward()

The named image starts animating forward.

Amulet:document.imageName.regularSpeed()

The named image animates at normal speed.

Amulet:document.imageName.slowSpeed()

The named image animates slowly.

Amulet:document.imageName.superFastSpeed()

The named image animates very quickly.

Amulet:document.imageName.superSlowSpeed()

The named image animates very slowly.



Table 4. Control Widget href functions for inter-widget communications with Scribble Widgets.

Amulet:document.widgetName.clearCanvas()

Clears the scribble canvas completely, including any background images in the canvas.

Amulet:document.widgetName.reset()

Redraws the canvas image from flash.

Amulet:document.widgetName.saveCanvas()

Saves the current state of the canvas to the flash. Writes over the original canvas specified at compile time.

Amulet:document.widgetName.setLinePattern(x)

The named Scribble widget will set its active freehand drawing line pattern to pattern x. (range 0-15)

Amulet:document.widgetName.setLineWeight(x)

The named Scribble widget will set its active freehand drawing line weight to x. (range 1-15)

Amulet:document.widgetName.uploadImage()

Scribble widget uploads its raw image data via the connection and protocol described in the href parameter.


Valid View Widget (except StringField) href functions

Table 5. View Widget href functions (except StringField widget).

Amulet:document.widgetName.value()

Returns the intrinsic value (byte or word) of the named Control Widget.

Amulet:document.widgetName.maskedValue(y)

Returns the intrinsic value (byte or word) of the named Control Widget ANDed with the mask y.

Amulet:internal.fileNumber.value()

Returns the internal flash index number of the current page. See Amulet link map file documentation for more information.

Amulet:internal.lostCommByte.value()

Returns the count of consecutive communication time-outs.

Amulet:internalRAM.byte(x).value()

Returns the value of internalRAM byte variable x.

Amulet:internalRAM.byte(x).maskedValue(y)

Returns the value of internalRAM byte variable x ANDed with the mask y.

Amulet:internalRAM.word(x).value()

Returns the value of internalRAM word variable x.

Amulet:internalRAM.word(x).maskedValue(y)

Returns the value of internalRAM word variable x ANDed with the mask y.

Amulet:math.randomByte.value()

Returns a pseudo-random byte.

Amulet:math.randomByte.maskedValue(y)

Returns a pseudo-random byte ANDed with the mask y.

Amulet:math.randomFilteredByte.value()

Returns a pseudo-random byte that is filtered.

Amulet:math.randomFilteredByte.maskedValue(y)

Returns a pseudo-random byte that is filtered ANDed with the mask y.

Amulet:NOP()

Returns nothing.

Amulet:UART.byte(x).value()

Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x.

Amulet:UART.byte(x).maskedValue(y)

Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x ANDed with the mask y.

Amulet:UART.word(x).value()

Sends a getWord request over the UART, where x is the word variable number; returns the value of the word variable x.

Amulet:UART.word(x).maskedValue(y)

Sends a getWord request over the UART, where x is the word variable number; returns the value of the word variable x ANDed with the mask y.



Valid StringField widget href functions

Table 6. StringField Widget href functions.

Amulet:document.widgetName.value()

Returns the intrinsic value (byte, word or string) of the named Control Widget.

Amulet:internal.lostCommByte.value()

Receives the count of consecutive communication time-outs. (Only valid if option field populated.)

Amulet:internal.OSVersionString.value()

Returns the string of  the current Amulet OS version number.

Amulet:internalRAM.byte(x).value()

Returns the value of internalRAM byte variable x.

Amulet:internalRAM.byte(x).maskedValue(y)

Returns the value of internalRAM byte variable x ANDed with the mask y.

Amulet:internalRAM.string(x).value()

Returns the string of internalRAM string variable x.

Amulet:math.randomByte.value()

Receives a pseudo-random byte.

Amulet:math.randomByte.maskedValue(y)

Receives a pseudo-random byte ANDed with the mask y.

Amulet:UART.byte(x).value()

Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x. (Only valid if option field populated.)

Amulet:UART.byte(x).maskedValue(y)

Sends a getByte request over the UART, where x is the byte variable number; returns the value of the byte variable x ANDed with the mask y. (Only valid if option field populated.)

Amulet:UART.string(x).value()

Sends a getString request over the UART, where x is the string variable number; returns a null terminated ASCII string.


Valid Scribble widget href functions

Table 7. Scribble Widget href function.

Amulet:UART.xmodemUploadImage()

The Scribble Widget will upload raw image data out the UART using an xmodem protocol upon receiving the uploadImage() IWC method.


Valid Line Graph widget href functions

Table 8. Line Graph Widget href function.

Amulet:internalRAM.bytes(x).value()

Returns the array of internalRAM bytes starting at variable x.

Amulet:internalRAM.words(x).value()

Returns the array of internalRAM words starting at variable x.

Amulet:UART.bytes(x).value()

Sends a getByteArray request over the UART, where x is the starting byte variable number; returns the array starting at byte variable x.

Amulet:UART.words(x).value()

Sends a getWordArray request over the UART, where x is the starting word variable number; returns the array starting at word variable x.



Amulet HTMLCompiler,
Copyright © 2000-2004 by
Amulet Technologies, LLC

Back to Welcome - Contact Amulet - Amulet Home