esrf

Beamline Instrument Software Support
SPEC Macro documentation: [ Macro Index | BCU Home ]

Utilities for shared memory SPEC arrays
See other macros in category: All
Description:
    SPS.MAC
Documentation:
    DESCRIPTION
    This file contains some utilities for SPEC shared memory arrays.
    • Functions to read and write shared memory environment variables which can be used to exchange abritrary string values with other programs (SPS_CreateEnv, SPS_PutEnv, SPS_GetEnv)
    • Functions to put standard scan data into shared memory for other programs to use it (shareddata, privatedata)
    • Test routines to produce some example image data


Macros:
    SPS_CreateEnv
    Usage: SPS_CreateEnv (name, no_items, max_length)
    Create a shared environment array called name (something like xxxxx_ENV) which contains strings to be shared with other applications in the format identifier=value with maximal string length max_length. A maximum of no_items of such lines can be put into this array.

    SPS_PutEnv
    Usage: SPS_PutEnv (arr, id, value)
    Put the value in the shared memory array arr under the identifier id in the format id = value.

    SPS_GetEnv
    Usage: SPS_GetEnv (arr, id)
    Get the value from the shared memory environment array arr with the identifier id.

    shareddata
    Usage: shareddata
    Put scan data in shared memory.

    privatedata
    Usage: privatedata
    Put scan data in private memory.

    testimage
    Usage: testimage [dim] [scale]
    Produce a nice looking double image called image_test[dim][dim]. Use scale values between 1 and 10.

    testgrid
    Usage: testgrid [dim] [width] [height]
    Produce a nice looking unsigned short integer grid image called image_data. height is a scaling factor for the heigth of the grid peaks. width is the width of the individual peaks (always spaced 50 pixels)

Internal Macros:
    SPS_scanhead
    Usage: SPS_scanhead
    This macro is executed once for every scan at the beginning of the scan

    SPS_scanabort
    Usage: SPS_scanabort
    This macro is executed once for every scan at the beginning of the scan

    SPS_onepoint
    Usage: SPS_onepoint
    This macro is executed once for every scan point

    testfunc
    Usage: testfunc(x, y)
    testfunctions used by testimage

Filename: sps.mac
Author: JK 4.99
Last mod.: 03/10/2014 13:00 by witsch