Home

SDK 8 User's Guide

image

Contents

1. 176 XLR_ERR_NOTIN_RECMODE Command only valid when in record mode 177 XLR_ERR_EXT_TO_PCI_ External port to PCI overflow OVERFLOW 178 XLR_ERR_INVALID_ Command is not available for the INTERFACE currently in use interface PCI bus Ethernet or Serial port T79 XLR_ERR_INVALID_RETURN Data returned from command is _FORMAT formatted incorrectly Ethernet and Serial port interfaces only 180 XLR_ERR_INVALID_ The channel being selected or CHANNEL bound is invalid 181 XLR_ERR_INVALID_OP_ON_ Operation is not permitted on this CHANNEL channel 182 XLR_ERR_USE_SELECT SS_OPT_FPDPEXTCONN is no longer CHANNEL valid for selecting the front FPDP port XLRSelectChannel must be used 183 XLR_ERR_INVALID_SYSTEM Requested mode is invalid _MODE 184 XLR_ERR_TOO_MANY_ Only 1 input or output channel is CHANNELS allowed in this mode 185 XLR_ERR_NO_INPUT_ Must have at least 1 input CHANNELS channel 186 XLR_ERR_NO_OUTPUT_ Must have at least 1 output CHANNELS channel 187 XLR_ERR_NOT_VALID_IN_ Operation not valid in mutli MULTI channel mode 188 XLR_ERR_PARTITION_SIZE Partition size must be multiple of page size 189 XLR_ERR_INVALID_ Invalid partition PARTITION 190 XLR_ERR_TOO_MANY Only 256 partitions are permitted PARTITIONS 191 XLR_ERR_NOT_EMPTY System mus
2. xlrStatus XLRSetDBMode xlrDevice SS_FPDP_RECV 0 Example 2 Enable the data strobe clock and Not Ready assert options on a PCI 816XF2 and use FPDP RM xlrReturnCode XLRSetDBMode xlrDevice SS_FPDP_RECVMASTER SS_OPT_FPDPSTROB SS_OPT_NRASSERT Example 3 Enable data strobe clock and use FPDP R on a PCI 816XF2 XLRSetDBMode xlrDevice SS_FPDP_RECV SS_OPT_FPDPSTROB Example 4 Enable FPDP RM mode on a PCI 816XF2 using the default options xlrStatus XLRSetDBMode xlrDevice SS_FPDP_RECVMASTER 0 Example 5 Enable data strobe clock on an Amazon daughterboard using FPDP RM xlrStatus xlrDevice SS_FPDPMODE_RECVM SS_DBOPT_FPDPSTROB Example 6 Enable Not Ready assert options on an Amazon daughterboard and use FPDP RM xlrReturnCode XLRSetDBMode xlrDevice SS_FPDPMODE_RECVM SS_DBOPT_FPDPNRASSERT See Also XLRSetMode and XLRSelectChannel 122 CHAPTER 2 FUNCTION REFERENCE XLRSetDriveStandbyMode Syntax T XLR_RETURN_CODE XLRSetDriveStandbyMode SSHANDLE xlrDevice BOOLEAN StandbyEnable Description XLRSetDriveStandbyMode is used to put the drives into power standby mode and to take the drives out of power standby mode Standby mode is a power management feature that spins down disk drives The spindle motor is stopped and most of the electronics are powered off Placing drives in sta
3. Description XLRGetDevicelnfo retrieves information from the StreamStor device about its physical configuration If the StreamStor is in bank mode this command will report on the currently selected bank For example the number of drives reported will be the number of drives on the selected bank Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e pDevInfoisa pointer to an S_DEVINFO structure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_DEVINFO devinfo XLR_RETURN_CODE xlrReturn rn XLROpen 1 amp xlrDevice Return XLR_SUCCESS return 1 r R n XLRGetDeviceInfo xlrDevice amp devInfo eturn XLR_SUCCESS return 1 printf StreamStor serial number is d devInfo SerialNum See Also XLRGetDBInfo XLRSetBankMode and XLRSelectBank 52 CHAPTER 2 FUNCTION REFERENCE XLRGetDeviceStatus Syntax XLR_RETURN_CODE XLRGetDeviceStatus SSHANDLE xlrDevice PS_DEVSTATUS pDevStatus Description XLRGetDeviceStatus retrieves status of the StreamStor device If the StreamStor is in bank mode this command will report the device status of the currently selected bank Parametets e xlrDevice is the device handle returned from a previous call to XLROpen
4. Record for a while on channel zero xlrStatus XLRRecord xlrDevice 0 1 printf Recording record for a while printf Recording done n Stop recording XLRStop hTarget Select Channel to read channel 0 xlrStatus XLRSelectChannel xlrDevice 0 Bind PCI Bus channel 0 as output channel xlrStatus XLRBindOutputChannel xlrDevice pBuf PULONG malloc BUFFER_SIZE 180 X LRClearChannels Input will be done over the PCI Bus which is channel zero xlrStatus XLRBindInputChannel xlrDevice 0 r CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION Build the read descriptor dwAddress START_ADDRESS sRead AddrHi ULONG START_ADDRESS lt lt 32 sRead AddrLo ULONG START_ADDRESS sRead BufferAddr pBuf sRead XferLength BUFFER_SIZE r maas xlrStatus XLRRead xlrDevice amp sRead printf Read Complete n XLRClose xlrDevice if pBuf free pBuf pBuf NULL 181 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION Example 2 The following C code shows how to set up the top FPDP connector as an input channel to record then read the data back through the PCI Bus Channel 0 EZ include files include lt stdio h gt include lt string h gt include xlrapi h ifndef WIN32 include
5. Description XLRApiVersion returns the API version as a string formatted as a major minor version number Parametets e versionstring isa pointer to a character string to hold the returned version It must be of minimum length XLR_VERSION_LENGTH CI Return Value The API version is returned in versionstring Usage Read XLR API version into string char xlrstring XLR_VERSION_LENGTH XLRApiVersion xlrstring printf StreamStor API version is s xlrstring See Also XLRGetVersion 24 CHAPTER 2 FUNCTION REFERENCE XLRAppend Syntax XLR_RETURN_CODE XLRAppend SSHANDLE xlrDevice T Description XLRAppend is used to restart a recording after it has been stopped Data is appended to the existing recording If the StreamStor is in bank mode data will be appended to the selected bank If the StreamStor is partitioned this command will append data to the currently selected partition Parameters e xlrDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_READDESC readDesc ULONG myBuffer 40000 XLR_RETURN_CODE xlrReturnCode Open the devic xlrReturnCode XLROpen 1 amp xlrDevice xlrReturnCode XLRRecord xlrDevice 0 1 if
6. XLRGetErrorMessage errorMessage XLRGetLastError printf Error is s n errorMessage XLRClose xlrDevice exit 1 if XLRGetPartitionInfo xlrDevice amp pInfo XLR_SUCCESS printf Could not get partition information n XLRGetErrorMessage errorMessage XLRGetLastError printf Error s n errorMessage XLRClose xlrDevice exit 1 printf Selected Partition u n pInfo SelectedPartition printf tTotal Pages u n pInfo PartitionCapacity if XLRGetLabel xlrDevice label XLR_SUCCESS printf Could not get label from partition u n k XLRGetErrorMessage errorMessage XLRGetLastError printf Error is s n errorMessage XLRClose xlrDevice exit 1 printf tLabel s n label printf Number of Partitions u n pInfo NumPartitions printf Pages in partitions u n pInfo SpaceAllocated printf Pages available for partitioning u n pinfo SpaceAvailable Erase data remove partitions labels etc XLRErase xlrDevice SS_OVERWRITE PARTITION System should now be unpartitioned if XLRGetPartitionInfo xlrDevice amp pInfo XLR_SUCCESS printf Could not get partition information n XLRGetErrorMessage errorMessage XLRGetLastError printf Error s n errorMessage XLRClose xlrDevice exit 1 if pInfo Partitioned TRUE printf
7. ifndef TRUE define TRUE 1 define FALSE 0 endif define PAGE_SIZE 4096 int main int argc char argv SSHANDLE xlrDevice S_PARTITIONINFO pinfo UINT k UINT pSizelInBytes char errorMessage XLR_ERROR_LENGTH char label XLR_LABEL LENGTH 4 if XLROpen 1 amp xlrDevice XLR_SUCCESS printf Could not open StreamStor n exit 1 See if this StreamStor was partitioned By default partition zero is selected if XLRGetPartitionInfo xlrDevice amp pInfo XLR_SUCCESS printf Could not get partition information n XLRGetErrorMessage errorMessage XLRGetLastError printf Error s n errorMessage XLRClose xlrDevice exit 1 if pInfo Partitioned TRUE printf This system is partitioned It has u paritions n pInfo NumPartitions else printf This system is not partitioned n The first time you create a partition the device must 196 CHAPTER 8 DRIVE PARTITIONING be empty if XLRErase xlrDevice SS_OVERWRITE_NONE XLR_SUCCESS printf Could not erase system XLRGetErrorMessage errorMessage XLRGetLastError printf Error s n errorMessage XLRClose xlrDevice exit 1 Create two partitions of different sizes for k 0 k lt 2 k
8. xlrStatus X C ROpen 1 amp xlrDevice Set all options to their default values xlrStatus XLRClearOption xlrDevice SS_ALL_OPTIONS Set the desired option xlrStatus XLRSetOption xlrDevice SS_OPT_PLAYARM Clear the option xlrStatus XLRClearOption xlrDevice SS_OPT_PLAYARM See Also XLRSetOption and XLRGetOption 33 CHAPTER 2 FUNCTION REFERENCE XLRClearWriteProtect Syntax XLR_RETURN_CODE XLRClearWriteProtect SSHANDLE xlrDevice Description XLRClearWriteProtect removes write protection from a previously write protected StreamStor recorder By default drives are not write protected The drives must be idle Le no recording or playback in progress to clear the write protection If the StreamStor is in bank mode this command will clear write protection only on the currently selected bank Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRClearWriteProtect xlrDevice E Close device befor xiting XLRClose xlrDevice See Also XLRSetWriteProtect XLRSetBankMode and XLRSelectBank 34 CHAPTER
9. The API function XLRGetPartitionInfo is used to retrieve information from the StreamStor about the currently selected partition To obtain this information you pass XLRGetPartitionInfo a pointer to a structure of type S_PARTITIONINFO The structure is returned populated with the total number of partitions on the StreamStor the partition number of the selected partition the capacity of the selected partition etc Full details of the S_PARTITIONINFO structure can be found at the end of the Function Reference chapter To determine the amount of data that has been recorded in a partition you first select the partition of interest Next call XLRGetDirectory if the device is idle or XLRGetLength if the device is not idle Bank Mode and Partitioning Partitioning can be used in conjunction with bank mode When in bank mode you can optionally partition one or both modules In practice when you are using bank mode you will probably always want to partition both modules If in bank mode the selected bank and the selected partition are used to determine where subsequent StreamStor operations are performed For 193 CHAPTER 8 DRIVE PARTITIONING example if you call XLRSelectBank to select Bank B then call XLRPartitionSelect to select partition six if you should then call XLRSet Label that label will be applied only to partition six on Bank B Note that if you are in bank mode and ar
10. Available bytes fi 740826704 Quit Status Ready Read From Byte Address jo File size bytes 4096 Fetch To Single File Filename temp dat A C Multiples Files Directory Prefix a ata Extension ca Start fo End E Digits E Filenames data000 dat data004 dat F Overwrite files There are two options when using ssfetch to retrieve data the first option is to simply retrieve a block of data to a single system file The Single File button enables this mode and the filename specified is used as the destination for data retrieved from StreamStor The current status of the recorder is displayed in the Status field and the Available bytes field indicates the length of data currently recorded on the device The Read From box provides the controls for specfying the location and amount of data to be retrieved The amount File size and address must be an increment of 4 bytes 16 CHAPTER 1 INTRODUCTION Co Sireamton Data ketch Board Number fi v Available bytes j 740826704 Status Ready Read From Byte ddress jo File size bytes 4096 m Fetch To C Single File Filename empat L Multiples Files Directory estem ts Prefix data Extension dat Start fj End 4 Digits Boo Filenames data000 dat data004 dt 0 M Overwrite files The second option for retrieving data is to use the Mu
11. Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e values isa pointer to an array of S_SMARTTHRESHOLDS structures The array must be large enough to hold at least XLR_MAX_SMARTVALUES structutes e Bus is the ATA bus number of the drive e MasterSlave is XLR_MASTER_DRIVE 0 of XLR_SLAVE_DRIVE 1 to select the master or slave drive on the ATA bus T Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_SMARTTHRESHOLDS thresholds XLR_MAX_SMARTVALUES xlrStatus XLROpen 1 amp xlrDevice if XLRReadSmartThresholds hTarget thresholds 3 XLR_MASTER_DRIVE XLR_SUCCESS printf Threshold information not available for Bus 3 Master drive n else Interpret the thresholds 100 CHAPTER See Also XLRReadSmartValues XLRSelect 2 Bank FUNCTION REFERENCE XLRGetDrivel 101 Info XLRSet BankMode and CHAPTER 2 FUNCTION REFERENCE XLRReadSmartValues Syntax XLR_RETURN_CODE XLRReadSmar PUSHORT version S_SMART MasterSlave Description THRI tValues SSHANDLE xlrDevice ESHOLDS values UINT Bus UINT XLRReadSmartValues returns the SMART values that are provided by the disk drive vendor s self monitoring facility To
12. e pDevStatus is a pointer to an S_DEVSTATUS structure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_DEVSTATUS devStatus XLR_RETURN_CODE xlrReturn xlrReturn XLROpen 1 amp xlrDevice if xlrReturn XLR_SUCCESS return 1 xlrReturn XLRGetDeviceStatus xlrDevice amp devStatus if xlrReturn XLR_SUCCESS return 1 if devStatus Recording printf StreamStor is recording printf StreamStor is idle See Also XLRGetBankStatus XLRSetBankMode and XLRSelectBank 53 CHAPTER 2 FUNCTION REFERENCE XLRGetDirectory Syntax T XLR_RETURN_CODE XLRGetDirectory SSHANDLE xlrDevice PS_DIR pDir Description XLRGetDirectory gets the directory information of the current recording on a StreamStor device The drives must be idle i e no recording or playback in progress when this function is called If the StreamStor is in bank mode this command will report directory information on the currently selected bank If data on the StreamStor was recorded in multi channel mode this command will report directory information for data recorded on the currently selected channel Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e pDir isa pointer to an S_DIR structu
13. Usage SSHANDLE xlrDevice S_DRIVEINFO drvinfo XLR_RETURN_CODI xlrReturn LT xlrReturn XLROpen 1 amp xlrDevice if xlrReturn XLR_SUCCESS return 1 xlrReturn XLRGetDrivelInfo xlrDevice 0 XLR_MASTER_DRIVE amp drvInfo if xlrReturn XLR_SUCCESS return 1 printf Drive serial number is s n drvInfo Serial printf Drive model number is s n drvInfo Model printf Drive revision s n drvInfo Revision printf Drive capacity sectors d n drvInfo Capacity See Also XLRSetBankMode and XLRSelectBank 55 CHAPTER 2 FUNCTION REFERENCE XLRGetDriveTemp Syntax XLR_RETURN_CODE XLRGetDriveTemp SSHANDLE xlrDevice UCHAR Bus UCHAR MasterSlave PUINT Description temp XLRGetDriveTemp retrieves the current temperature in C reading from the disk drive Drive temperature information is retrieved from the drive s SMART Self Monitoring Analysis and Reporting Technology data Some drive models are not SMART capable so temperature information cannot be retrieved by XLRGet DriveTemp XLRGetDriveTemp is supported on a limited number of drive models Each disk drive vendor has its own technique for storing drive temperature data Therefore you should independently verify that the drive temperatures reported by XLRGetDriveTemp ate accurate for your
14. XLRWriteData Syntax XLR_RETURN_CODE XLRWriteData SSHANDLE xlrDevice PVOID BufAddr ULONG TransferSize Description XLRWriteData is identical to XLRWrite except that the parameters are not passed in a structure If the StreamStor is in bank mode this command will write data from the currently selected bank Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e BufAddr is a pointer to the buffer to be written to StreamStor e TransferSize is the number of bytes to write Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice ULONG myBuffer 40000 XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice ll x xlrReturnCode LRWriteData xlrDevice myBuffer sizeof myBuffer See Also XLRRecord XLRAppend XLRWrite XLRSetMode XLRSetBankMode and XLRSelectBank 145 CHAPTER 2 FUNCTION REFERENCE Structure S BANKSTATUS typedef struct _BANKSTATUS char abel XLR_LABEL LENGTH DWORDLONG Length UINT State UINT Selected UINT PowerRequested UINT PowerEnabled UINT MediaStatus UINT WriteProtected UINT ErrorCode UINT ErrorData UINT TotalCapacity S_BANKSTATUS PS_BANKSTATUS Purpose This structure is used by the XLRGetBankStatus function to return
15. recover from an ovetflow situation is to stop and restart StreamStor 7 NOTE In forking mode the recording to disk will continue accurately and uninterrupted only the order of the output data stream will be inaccurate 204 Chapter 10 Technical Support 303 485 2721 support conduant com www conduant com support CHAPTER 10 TECHNICAL SUPPORT Technical Support Conduant wants to be sure that your StreamStor system works correctly and stays working correctly In the unlikely event however that you are unable to get your new system to work properly or if a working system ceases to function we will do all that we can to get your system back online Solving the problem is largely a matter of data collection and steps that must be taken one at a time In order for us to better serve you we ask that you take the time to perform the following steps prior to calling us This way you can provide us with the most meaningful information possible that will help us solve the problem Is the problem one that obviously requires replacement parts due to physical damage to the system If yes then please gather the information described below and report the problem to tech support by phone or through the Conduant web site Have you confirmed that no cabling has been inadvertently disconnected or damaged while working around the equipment Is the card properly seated in the PCI slot Do all the disk drives have good power connect
16. Error this system should not be partitioned now else printf nThis system is not partitioned anymore n XLRClose xlrDevice exit 0 198 CHAPTER 8 DRIVE PARTITIONING Output from this program would look something like this This system is not partitioned Creating partition 0 with size 409600 bytes 100 pages Creating partition 1 with size 819200 bytes 200 pages Selected Partition 0 Total Pages 100 Label Partition_0 Selected Partition 1 Total Pages 200 Label Partition_1 Number of Partitions 2 Pages in partitions 300 Pages available for partitioning 134516582 This system is not partitioned anymore 199 Chapter 9 Forking and Passthru CHAPTER 9 FORKING AND PASSTHRU Forking and Passthru Overview NOTE Forking amp NOTE StreamStor cards have the capability of real time passing and forking of data streams Data forking is the simultaneous recording and output of data This is a real time operation which allows for the manipulation of data as well as recording of that same data stream simultaneously Forking requites input from one source PCI bus top or front FPDP connector and a different output channel For example data could be received over the front FPDP port recorded to disk and sent out the top FPDP port Passthru is the input of data over 1 channel PCI bus top or front FPDP port and the simultaneous output
17. SSHANDLE xlrHandle XLR_RETURN_CODE xlrStatus UINT eventCount 0 UINT i 0 PS_EVENTS eventBufPtr NULL xlrStatus XLROpen 1 amp xlrHandle Select the desired channels Set the FPDP mode and select the type of event to capture This shows how to capture events on rising edge of SYNC signal on a PCI 816XF2 Note that to use any of the SS_OPT_EVENT_ options you must or the option or options with SS_OPT_EVENTLOG xlrStatus XLRSetDBMode xlrHandle SS_FPDP_RECVMASTER SS_OPT_FPDPEVENTLOG SS_OPT_EVENT_SYNC_RISE Record some data xlrStatus XLRStop xlrHandle Get the number of events that were captured so you know how much space to allocate to hold them Jf eventCount XLRGetEventsLength xlrHandle eventBufPtr PS_EVENTS malloc eventCount sizeof S_EVENTS Retrieve th vents into the array xlrStatus XLRGetEvents xlrHandle eventCount sizeof S_EVENTS eventBufPtr Examine the events for i 0 i lt eventCount itt printf Event Su Source 0x X i eventBufPtr i Source printf Address 0x X X n eventBufPtr i AddressHigh eventBufPtr i AddressLow See Also XLRSetDBMode XLRGetEventsLength and XLRRetrieveEvents 59 CHAPTER
18. StreamStor Real Time Storage Controller SDK 8 Users Guide Copyright and Trademarks The information in this document is subject to change without notice This document contains proprietary information that is protected by copyright All rights are reserved No part of this document may be photocopied reproduced or translated to another language without the prior written consent of Conduant Corporation Printed in the United States 2008 Conduant Corporation All rights reserved StreamStor is a trademark of Conduant Corporation All other trademarks are the property of their respective owners Manual version 8 32 Publication date March 26 2008 Table of Contents Copyright and TRademar kK Sissel oii evens eae Oe eed 3 License Agreement and Limited Warranty ccceceeee eee ee eens 9 Chapter L Introduction oC is ced dipa Gs cements cece lOO ete bans 11 The StreamStor Software Development Kit sssesssessssessssonsesessscsssscessssssssesssessnvesenvesenveseavssensesnaeess 12 Nnstalltme the Sofya enero a e i cvus dsoubvos vob duos e dee dodecadesste 12 Software GOMPONENUS ssseisiecsceseiessivsieseveresrseveserssreaievedearsedeieassvvadevederriedetetsinvndesederriededetsindedevedesriedetedsdvvaieders 13 Device TOTEN A ses hi EE ares taes be aaa teateecatena snd biar saat sade Raita ovdtas A a E A a 13 Wendo s TUMAU Fos RETETE sien lack inh RNE A a unsung Geer aennias 13 Windows Configuration Test UNY yiii ieis
19. T DWORDLONG XLRGetPlayLength SSHANDLE xlrDevice Description XLRGetPlayLength returns the number of bytes that have been played back between calling XLRPlayback and XLRStop You can call XLRGetPlayLength while the StreamStor is playing back In this case however the number of bytes played back is only an estimate because the number of bytes played back is updated internally approximately every three seconds Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value e Number of bytes played back Zero is returned if an error occurred Usage SSHANDLE xlrDevice ULONG addrHi addrLow DWORDLONG bytesPlayed char errMessage XLR_ERROR_LENGTH XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice addrHi 0 addrLow 0xFE120000 xlrReturnCode XLRPlayback xlrDevice addrLow addrHi XLRStop xlrDevice Get the number of bytes that were played back bytesPlayed XLRGetPlayLength xlrDevice if bytesPlayed printf Nothing got played back n XLRGetErrorMessage errMessage XLRGetLastError printf XLRGetPlayLength error s n errMessage See Also XLRPlayback and XLRSetPlaybackLength 72 CHAPTER 2 FUNCTION REFERENCE XLRGetSample Syntax XLR_RETURN_CODE XLRGetSample SSHANDLE xlrDevice UINT bufSize PULONG pBuffer Desc
20. UINT PciBus UINT PciSlot UINT NumExtPorts S_DEVINFO PS_DEVINFO Purpose This structure is used by the XLRGetDeviceInfo function to return information about the StreamStor system configuration Members e BoardType the board type model name e SerialNum the serial number of the StreamStor board e NumDrives the number of drives currently connected and configured on the StreamStor controller e NumBuses the number of ATA buses in use e TotalCapacity the total recording capacity of the StreamStor system in system pages a page is 4096 bytes typically on Intel based Windows systems e MaxBandwidth Reserved e PciBus the PCI bus number to which the StreamStor is connected e PciSlot the PCI slot number to which the StreamStor is connected e NumExtPorts the number of external ports 149 CHAPTER 2 FUNCTION REFERENCE Structure S DEVSTATUS typedef struct _DEVSTATUS BOOLEAN SystemReady BOOLEAN BootmonReady BOOLEAN Recording BOOLEAN Playing BOOLEAN Reservedl BOOLEAN Reserved2 BOOLEAN Reserved3 BOOLEAN Reserved4 BOOLEAN RecordActive XLR_MAX_VRS BOOLEAN ReadActive XLR_MAX_VRS BOOLEAN FifoActive BOOLEAN DriveFail UINT DriveFailNumber BOOLEAN SysError UINT SysErrorCode BOOLEAN Booting BOOLEAN FifoFull BOOLEAN Overflow XLR_MAX_VRS S_DEVSTATUS PS_DEVSTATUS Purpose
21. XLRSetOption XLRGetPlayBufferStatus and XLRPlayback 94 CHAPTER 2 FUNCTION REFERENCE XLRRead Syntax X XLR_RETURN_CODE XLRRead SSHANDLE xlrDevice PS_READDESC pReadDesc Description XLRRead reads data from the StreamStor device The address of the requested data must be an eight byte aligned value If the StreamStor is in bank mode this command will read data from the currently selected bank If data was recorded on multiple channels before reading it you must first select the channel upon which the data was recorded and then bind it as the input channel Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e pReadDesc is a pointer to an S_READDESC structure that holds the read address length and buffer address for the read data Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_READDESC readDesc ULONG myBuffer 40000 XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice AddrHi and AddrLo must represent an appropriately aligned address readDesc AddrHi 0 readDesc AddrLo OxFE120000 readDesc XferLength sizeof myBuffer readDesc BufferAddr myBuffer xlrReturnCode XLRRead xlrDevice amp readDesc See Also XLRPlayback XLRSetMode XLRSetDBMod
22. myBuffer 40000 readStatus xlrReturnCode XLROpen 1 amp xlrDevice and AddrLo must represent an appropri AddrHi AddrLo Hi 0 OxFE120000 readDesc xlrReturnCod readStatus readStatus if PROC See Also XLRReadStatus XferLengt Buf ferAddr y DO SOME h sizeof myBuffer myBuffer ately aligned address XLRReadImmed xlrDevic Ah T NON STREAMSTOR R ELATED WORK H ERE oy XLRReadStatus TRU XLR_READ_COMPL GI ESS ERROR 99 amp readDesc i XLRSet BankMode and XLRSelectBank CHAPTER 2 FUNCTION REFERENCE XLRReadSmartThresholds Syntax XLR_RETURN_CODE XLRReadSmartThresholds SSHANDLE xlrDevice S_SMARTTHRESHOLDS values UINT Bus UINT MasterSlave Description XLRReadSmartThresholds returns the SMART threshold values that are provided by the disk drive vendor s self monitoring facility To interpret the values returned please refer to the ATA specifications or to the disk drive vendor s documentation If the StreamStor is in bank mode this command will return the values for the specified drives on the currently selected bank This function is only supported on disk drives that support self monitoring You can call XLRGetDrivelInfo then examine the returned SMARTCapable value to determine this
23. xlrReturnCode XLROpen 1 amp xlrDevice xlrReturnCode XLRSelectChannel xlrDevice 30 xlrReturnCode XLRSetPortClock xlrDevice SS _PORTCLOCK_40MHZ 132 CHAPTER 2 FUNCTION REFERENCE XLRSetReadLimit Syntax XLR_RETURN_CODE XLRSetReadLimit SSHANDLE xlrDevice ULONG Limit T Description XLRSetReadLimit sets the size of the address range an outside device will be using when reading data from StreamStor during playback XLRPlayback This is required to prevent StreamStor hardware from discarding cached read data when an external DMA engine recycles to a new starting read address on the PCI bus Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e Limit is the address range size that the outside device will use when reading from StreamStor during playback operations Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice ULONG DMA_size 0x2000 PULONG pBuffer PULONG psSAddr XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice Put StreamStor into Playback mode at beginning of recording xlrReturnCode XLRSetReadLimit xlrDevice DMA_size xlrReturnCode XLRPlayback xlrDevice 0 0 Outside device can now DMA data from StreamStor within an address range size defined by DMA_size The f
24. BANK SWITCHING recording you could replace the full drive module in Bank A with a new drive module In this way you could continue recording as long as you want switching out full drives with empty drives indefinitely If bank mode is disabled or if the chassis or board type does not support bank mode all API functions operate on the drives as if the drives were a single device rather than two independent banks Selecting a Bank Some API functions are bank aware which means that when the TK200 is in bank mode the API function will be performed on the selected bank The selected bank is identified by bank aware API functions as follows e If the system is not in bank mode and then XLRSetBankMode is called to enable it Bank A if it is available is by default the selected bank If Bank A is not available i e there is no drive module in Bank A or Bank A s drive module is faulty then Bank B if it is available becomes the selected bank e If the system is in bank mode and then XLRSelectBank is called the bank specified in the XLRSelectBank call becomes the selected bank It remains the selected bank until XLRSelectBank is called to select a different bank e If the system is in bank mode and the StreamStor is closed by calling XLRClose then the next time XLROpen is called it will still be in bank mode The selected bank will be the bank that was selected at the time of the last call to XLRClose For example
25. Conduant will provide product support and upgrades on a fee paid basis Warranties on all third party software are passed through with the original manufacturer s warranty Conduant will provide no charge service for 90 days to replace or handle repair returns on third party software Any charges imposed by the manufacturer will be passed through to the customer DISCLAIMER OF WARRANTIES TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW CONDUANT CORPORATION DISCLAIMS ALL OTHER WARRANTIES AND CONDITIONS EITHER EXPRESS OR IMPLIED INCLUDING BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE TITLE AND NONINFRINGEMENT WITH REGARD TO THE STREAMSTOR PRODUCT AND THE SOFTWARE SOLE REMEDIES If the StreamStor Product or the Software do not meet Conduant Corporation s Limited Warranty and you return the StreamStor Product and the Software to Conduant Corporation Conduant Corporation s entire liability and your exclusive remedy shall be at Conduant Corporation s option either a return of the price paid if any or b repair or replacement of the StreamStor Product or the Software Any replacement Product or Software will be warranted for the remainder of the original warranty period LIMITATION OF LIABILITIES TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN NO EVENT SHALL CONDUANT CORPORATION BE LIABLE FOR ANY SPECIAL INCIDENTAL INDIRECT OR CONSEQUENTIAL DAMAGES WHATSOEVER INCLUDING WITHOUT LIMITAT
26. IMPORTANT When setting the operating mode for FPDP FPDP II connections on a given bus do not configure more than one connector as a transmitter FPDP TM or FPDP T on that bus at a time Otherwise bus drivers may be permanently damaged Parameters e xl rDevice is the device handle returned from a previous call to XLROpen e mode is a constant that defines the mode of operation e option is used to modify the operation of the FPDP port Please refer to the hardware manual for your StreamStor controller or daughterboard for the list of modes and options it supports Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus This example shows how to set various modes and options Note that the manifest constants used differ based on the type of devic For example FPDP R is SS_FPDPMODE_RECVM for an Amazon daughter and is SS_FPDP_RECVMASTER for a PCI 816XF2 xlrStatus XLROpen 1 amp xlrDevice Select chan the options xlrStatus X Example 1 options on nel 30 Subsequent XLRSetDBMode calls will set and the modes for the selected channel RSelectChannel xlrDevice 30 Set the FPDP port mode to FPDP R and use the default a PCI 816XF2
27. amp xlrDevice ll x xlrReturnCode FALSE LRReadFifo xlrDevice myBuffer sizeof myBuffer See Also XLRGetFifoLength XLRRecord XLRSetDBMode XLRSetBankMode and XLRSelectBank 97 CHAPTER 2 FUNCTION REFERENCE XLRReadimmed Syntax T XLR_RETURN_CODE XLRReadImmed SSHANDLE xlrDevice PS_READDESC pReadDesc Description XLRReadImmed reads data from the StreamStor device without waiting for completion You must receive XLR_READ_COMPLETE status from XLRReadStatus before any other commands can be issued Note that only a single outstanding request is allowed per execution thread The address of the requested data must be an eight byte aligned value If the StreamStor is in bank mode this command will read data from the currently selected bank Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e pReadDesc is a pointer to an S_READDESC structure that holds the read address length and buffer address for the read data Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 98 CHAPTER Usage SSHAN S_REA ULONG R_RI R_RI DLI DD A F F iT X X xlrReturnCode AddrHi readDesc readDesc readDesc D_STATUS URN_CODE 2 FUNCTION REFERENCE xlrDevice readDesc
28. assume that the StreamStor is in bank mode and XLRSelectBank has been called to select Bank B Then XLRRecord is called In this case recording will begin on Bank B If XLRGetDirectory is then called the length returned will be the length of the recording on Bank B To determine which bank is selected call XLRGetBankStatus and examine the selected member of the S_BANKSTATUS structure Recording a Drive Module When the TK200 is in bank mode API routines such as XLRRecord and XLRWrite can be used to put the recorder into record mode If both banks contain drive modules data will be written on the drive module in the selected bank until the drive module is full When full recording ceases on the selected bank Your application may then explicitly select the other bank to resume recording 186 CHAPTER 7 BANK SWITCHING Recording continues on the newly selected bank until its drive module too is full As long as full drtve modules are replaced by modules that are not full recording can continue in this fashion with recording alternating between the two banks until XLRSt op is called Playing back from a Drive Module Labeling In bank mode the standard XLRPlayback XLRRead or XLRReadData functions can be used to playback or read data into memory If both banks contain drives with data data will be played back from the drive module in the selected bank until all data from the selected bank has been played or a s
29. lt stdlib h gt for malloc endif define BUFFER_SIZE 131072 ifndef TRU define TRU define FALSE 0 endif define START_ADDRESS 0x100000 void PrintXLRError int main int argc char argv SSHANDLE hTarget S_READDESC sRead S_DEVINFO devinfo DWORDLONG startAddress 0 PULONG pBuf NULL XLR_RETURN_CODE xlrStatus xlrStatus X xlrStatus x xlrStatus X ROpen 1 amp hTarget RSetMode hTarget SS_MODE_SINGLE_CHANN RClearChannels hTarget a T FI i E E Bind the top port channel 30 as the input channel xlrStatus XLRSelectChannel hTarget 30 xlrStatus XLRBindInputChannel hTarget 30 xlrStatus XLRGetDevicelInfo hTarget amp devinfo strnemp devInfo BoardType AMAZON 6 0 xlrStatus XLRSetDBMode hTarget SS_FPDPMODE_RECVM 0 Fh H else xlrStatus XLRSetDBMode hTarget SS_FPDP_RECVMASTER 0 Start recording 182 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION xlrStatus XLRRecord hTarget FALSE TRUE T printf Recording n Record some data printf Recording done n XLRStop hTarget Set up to read the data we just recorded xlrStatus XLRSetMode hTarget SS_MODE_SINGLE_CHANNEL xlrStatus XLRClearChannels hTarget Select Channel to read channel
30. m Card Info r Revisions Total Capacity 46033829888 DLL Number of Drives E Firmware Board Type Pase oo bar Serial Number 094 0 C Monitor PCI Bus 200 C C C ATA Slot Number ee Driver Initialize Reset Drive Info If you encounter an error during initialization there may be damage to your system from shipping or the system has not been installed correctly Please contact technical support for assistance If the initialization has completed successfully you should check the information provided by sscfg to insure your system has been correctly identified according to your purchased model and configuration If you discover any problems please contact Conduant At this point you should press the Test button to run a quick confidence test on the controller board and disk system amp CAUTION Running the confidence test in ssclg WILL overwrite any recorded data on StreamStor storage If you get any error messages running this test please follow the instructions in the Troubleshooting section If this test completes successfully your StreamStor system is functioning normally Windows Fetch Utility The utility program ssfetch exe has been included to provide a basic tool for retrieving data from the StreamStor storage system to system disk files The interface to ss fetch looks like this 15 CHAPTER 1 INTRODUCTION streams Data pores Board Number ill X
31. xlrReturnCode XLR_SUCCESS exit 1 Data transfer Stop the record operation XLRStop xlrDevice Read some data back readDesc AddrHi 0 readDesc AddrLo 0x120000 readDesc XferLength sizeof myBuffer readDesc BufferAddr amp myBuffer xlrReturnCode XLRRead xlrDevice amp readDesc if xlrReturnCode XLR_SUCCESS exit 1 25 CHAPTER 2 FUNCTION REFERENCE Now start recording again without overwriting previous data xlrReturnCode XLRAppend xlrDevice if xlrReturnCode XLR_SUCCESS exit 1 See Also XLRRecord XLRSetBankMode and XLRSelectBank 26 CHAPTER 2 FUNCTION REFERENCE XLRArmFPDP Syntax T T XLR_RETURN_CODE XLRArmFPDP SSHANDLE xlrDevice Description XLRArmFPDP moves StreamStor from a ready to record state to recording when an FPDP SYNC pulse is received StreamStor must already be in record mode and SS_OPT_FPDPSYNCARM must be set If no SYNC pulse is received no data will be recorded Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrReturnCode 7 xlrReturnCode XLROpen 1 amp xlrDevice if XLRAppend xlrDevice XLR_SUCCESS E exit 1 if XLRArmF
32. 0 OxFE120000 readDesc xlrReturnCode XLREdit xlrDevice BufferAddr myBuffer and AddrLo must represent an appropriately aligned address amp readDesc 40 CHAPTER 2 See Also XLR EditData FUNCT XLRSet ION REFERENCE BankMode and XLRSelect 41 Bank CHAPTER 2 XLREditData FUNCTION REFERENCE Syntax XI R_RI Ei TURN_CODE XLR EFditData SSHANDLE xlrDevice PULONG BufferAddr U Description XLR LONG XferLength ULONG AddrHigh ULONG AddrLow EditData edits data from the StreamStor device by overwriting existing data specified by the AddrHi AddrLo and XferLength parameters with new data contained in the buffer pointed to by the BufferAddr This function is identical to XLREdit without the structure to pass the edit parameters The edit address of the requested data must be an eight byte aligned value If the StreamStor is in bank mode this command will edit the data on the currently selected bank If the StreamStor is partitioned this command will edit the data on the currently selected partition Parametets x1rDevice is the device handle returned from a previous call to XLROpen Buffer is the address of the user memory buffer to hold the requested data AddrHigh is the upper 32 bits of a 64 bit byte address of the requested data AddrLow is the lower 32 bits of a 64 bit b
33. AddressHigh UINT AddressLow UCHAR Reserved 4 S_EVENTS PS_ EVENTS Purpose This structure is used by the XLRGetEvents function to return information about events that have been captured as a result of setting one or more event options when calling the XLRSetDBMode function Members e Source Indicates the source of the event It is bit significant as follows gt Bit0 on PIO1 gt Bit1 on PIO2 gt Bit 3 on Sync e AddressHigh Upper 32 bits of location in bit stream where event occurred gt AddressLow Lower 32 bits of location in bit stream where event occurred e Reserved Not used 154 CHAPTER 2 FUNCTION REFERENCE Structure S PARTITIONINFO This structure is used by the XLRGetPartitionInfo function to return information about struct _PARTITIONINFO typedef BOOLEAN Partitio UINT NumParti UINT SpaceAll UINT SpaceAva UINT Selected UINT Partitio S_PARTITIONINFO Purpose partitions Members e Partitioned Indicates whether StreamStor is currently partitioned or not e NumPartitions The number of partitions currently on StreamStor e SpaceAllocated The number of pages currently allocated in partitions all partitions not just the currently selected partition e SpaceAvailable The number of pages of unpartitioned space available e SelectedPartition Currently selected partition e PartitionCapacity Size of the selected
34. BANK_B was selected a record was performed and then XLRClose was called XLROpen unless XLRSet select bank was changed with XLRSelect B would be the selected bank and BANK_ Upon reopening the StreamStor with BankMode was called to take the system out of bank mode or the Bank the system would still be in bank mode The StreamStor must be in bank mode to select a bank When calling XLRSelect Bank the drive module to be selected must be mounted in the selected bank and be in the ready state Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e bankID 1s the bank to be selected BANK_A or BANK_B Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 114 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetBankMode xlrDevice SS_BANKMODE_NORMAL Clear the write protection on Bank A xlrStatus XLRSelectBank xlrDevice BANK_A xlrStatus XLRClearWriteProtect xlrDevice Set the write protection on Bank B xlrStatus XLRSelectBank xlrDevice BANK_B xlrStatus XLRSetWriteProtect xlrDevice See Also XLRSetBankMode and XLRGetBankStatus 115 CHAPTER 2 FUNCTION REFERENCE XLRSe
35. Call XLRClearChannels once 2 For each channel call XLRSelectChannel to select the channel number to playback 3 Call XLRBindOutputChannel to select the output path 4 Call XLRSetDBMode to setup the daughterboard mode The order of calling these functions is very important See the coding examples at the end of this chapter Since a recorded channel retains the channel number it is recorded on only one channel number can recorded over each physical channel This means only one channel number can be recorded over the PCI bus channel 0 Forking and passthru are not supported when in multi channel mode SFPDP Multi channel Commands The StreamStor Amazon Real time Disk Controller Installation and User Manual lists the available commands for the Amazon controller Of the list of API commands in the Amazon User Manual these commands are not supported if using the SFPDP daughterboard in multi channel mode LRAppend LRDeleteAppend LREdit XLREditData LRGetFIFOLength RGetSample H1 RPlaybackLoop RPlayTrigger RReadFifo RRecoverData LRSetPlaybackLength LRSetReadLimit Et i LRSetSampleMode e KOR MRK KKK MK XM OX LRTruncate 178 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION The API command XLRSetPortClock is not available on the SFPDP daughter board regardless of the mode Some API commands are channel specific This means that the command oper
36. NOT be positioned at either end of the FPDP bus Note also that the maximum useable frequency in this mode will decay more rapidly as the cumulative distance from the clock source to the data source to the data destination increases In FPDP RMCM mode StreamStor acts as a Receive Master excepting that StreamStor also drives the FPDP clock signals on the FPDP bus In addition StreamStor terminates the clock signals PSTROBE PSTROBE and STROB as would a traditional FPDP TM while terminating the remaining signals as would a FPDP RM To use this mode StreamStor should be physically positioned at an end of the FPDP bus Note also that the maximum useable frequency in this mode will decay more rapidly as the cumulative distance from the clock source to the data source to the data destination increases When configuring StreamStor as a recorder it may be desirable to prevent a transmitter from sending data until the StreamStor recording function is fully enabled XLRSetDBMode can be used to assert the FPDP NRDY Not Ready signal when StreamStor is activated as a FPDP receiver NRDY will remain asserted until the StreamStor data recording process is ready to proceed An example of this is for a PCI 816XF2 XLRSetDBMode device SS_FPDP_RECVMASTER SS_OPT_FPDPNRASSERT IMPORTANT When connecting and configuring FPDP FPDP I connections on a given bus do not configure more than one connector as a transmitter FPDP TM or F
37. Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value This function returns the window size in bytes Usage ULONG xlrAddress xlrRange SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice if xlrStatus XLR_SUCCESS Error opening StreamStor xlrAddress XLRGetBaseAddr xlrDevice xlrRange XLRGetBaseRange xlrDevice DMA Hardware may now be programmed to write to any address from xlrAddress to xlrAddress xlrRange 49 CHAPTER 2 FUNCTION REFERENCE XLRGetDBinfo Syntax XLR_RETURN_CODE XLRDBInfo SSHANDLE xlrDevice PS_DBInfo pdbInfo Description T XLRGetDBInfo retrieves information from the StreamStor daughterboard The drives must be idle i e no recording or playback in progress to get daughterboard information Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e pdbInfo isa pointer to an S_DBInfo structure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLI INFO S_DB XLR_ Open the d xlrStatus X xlrStatus X printf Daug See Also XLRGetDevicel RET ry E URN_CO D xlrDevice dbInfo xlrStatus LT L vic ROpen 1 amp xl
38. This StreamStor device is NOT partitioned n If the device has any data or a user directory on it it must first b rased before we can begin partitioning the device if XLRErase xlrDevice SS_OVERWRITE_PARTITION XLR_SUCCESS printf Error Cannot erase Su n XLRGetLastError exit 1 Create a partition If this is the first partition to be created on the device it will be assigned a partition number of 0 If it is not the first partition XLRPartitionCreate will assign it the next available partition number if XLRPartitionCreate xlrDevice 0x10000000 XLR_SUCCESS printf Error PartitionCreate failed u n XLRGetLastError exit 1 See Also XLRPartitionSelect and XLRGetPartitionInfo 85 CHAPTER 2 FUNCTION REFERENCE XLRPartitionSelect Syntax XLR_RETURN_CODE XLRPartitionSelect SSHANDLE xlrDevice ULONG partition T Description XLRPartitionSelect will select an already existing partition Partitions are numbered starting at 0 Thus a 5 partition system will contain partitions 0 1 2 3 and 4 Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e partition is the partition number to select Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice if XLR
39. XLR_ERR_DLDCHECKSUM A required file is corrupted or upload failed 107 XLR_ERR_DRVFAIL A disk drive is failing to respond 108 XLR_ERR_NODRIVER Device driver not found or device already open 109 XLR_ERR_FIFO_INACTIVE Invalid command FIFO inactive 110 XLR_ERR_INVALIDVR An unconfigured or invalid VR was selected 111 XLR_ERR_NOTENABLED Optional feature not enabled 11 XLR_ERR_OUTOFRANGE Request was not in the recorded data range 113 XLR_ERR_NOTINF IFO Command valid only in FIFO mode 114 XLR_ERR_KERNELMEM Unable to allocate kernel memory 115 XLR_ERR_INTENABLE Unable install device interrupt 116 XLR_ERR_READCOLLISION Attempt to start multiple reads from single thread 117 XLR_ERR_READIDLE Attempted to check status on non xistent read request 118 XLR_ERR_FIFODRIVES Current drive configuration incompatible with FIFO mode 119 XLR_ERR_FWVERSION Hardware firmware incompatible with API version 120 XLR_ERR_OSFAIL A system call failed 121 XLR_ERR_THREADCREATE Process thread creation failed 122 XLR_ERR_EXPECTEDDISKS_ The number of expected disks MATCH doesn t equal the actual number of disks 123 XLR_ERR_BOARDTYPE Unknown board type found 124 XLR_ERR_FULL Insufficient disk space 127 XLR_ERR_INVOPT Invalid option value 142 XLR_ERR_INVALID_ Port in wrong mode for this PORTMODE operation 143 XLR_ERR_NOAPPEND Attempt to delete non existent append 144 XLR_ERR_EMPTY No data 145 XLR_ERR_INVALID_ BANK Invalid ba
40. address scheme 4 GB will allow the system is designed to ignore PCI addressing and assume any data wtitten within the PCI address range is data to be recorded sequentially The actual size of the data window can be found with a call to XLRGetBaseRange default 8MB The PCI data source card is required to maintain a destination address within this range This can easily be accomplished with DMA chaining or other techniques For example the data acquisition card can be programmed to start at the base address write 64kB than start over again at the base address for the next 64kB etc Recording Data To start a recording the application must call the XLRRecord function Once XLR_SUCCESS status has been returned from this function StreamStor will record all data written to its data address range This function should be called BEFORE starting the flow of data to prevent overflow on the data source device The user application can periodically sample the device status using XLRGetDeviceStatus to check for errors that occurred during recording Note that this function call generates PCI traffic and can impact data transfer bandwidth if used excessively Many data acquisition cards have operating modes that allow the capture of a specific number of data points Unfortunately the software does not usually allow specifying a number larger than a 32 bit integer 4 294 967 295 For this reason it may be necessary to use the data acquisition ca
41. available for the specific board type A single channel or multiple channels may be selected to record from Only one channel at a time can be selected to playback with the FPDP board type The SFPDP board type allows up to four channels to be played back at a time This section describes the commands that should be used to set up the StreamStor channels for recording and playback For StreamStor users who have software that was written prior to SDK 7 0 and currently use the PCI Bus to transfer data to from the StreamStor card yout software does not need to be modified to support the new channel options That is calls to the following API functions do not need to be added to your software since the defaults are set to single channel mode using the PCI Bus channel 0 gt XLRSetMode gt XLRBindInputChannel gt XLRBindOutputChannel gt XLRClearChannels gt XLRSelectChannel Calls to these functions only need to be added if gt you want to use the multi channel options or gt you want to use a channel other than the default channel for example if you want to use the FPDP front connector on a PCI 816XF2 instead of the FPDP top connector Channel Description The hardware manual for your StreamStor controller or daughterboard describes the available channels on your board type 176 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION Selecting an Operating Mode Clearing The StreamStor operatin
42. board The default channel for record and playback is the PCI Bus channel 0 To record and playback a single channel call XLRSelectChannel and then XLRBindInputChannel passing it the channel to record on Then to playback call XLRSelectChannel and then XLRBindOutputChannel passing it a parameter of the channel to playback through The SFPDP daughter board supports a maximum of four channels that can be recorded simultaneously by the StreamStor board and four channels can be played simultaneously To record multiple channels simultaneously the function XLRBindInputChannel must be called once for each channel to be recorded upon Note that all the channels you are going to use for recording must be bound and configured with XLRSet DBMode before you call XLRRecord Channels that are recorded in multi channel mode retain the channel number they were recorded on so when a channel needs to be played back this channel number must be selected using XLRSelectChannel On playback both the channel and data output path need to be selected The channel of data to be played back is selected using XLRSelectChannel 177 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION and the data output path is selected using XLRBindOutputChannel This method allows the data to be output on a different channel than it was recorded on This is a typical calling sequence to playback data recorded using multiple channels 1
43. derin ieri orite N EEE OE ETO E A NEO vets 154 Structure S PARITIONINE E O keerneennar en E E E EE N 155 Stuctire S READDES Coronea a nE REAO EESE RE EAER R 156 Structure S_SMAR TPTHRESHOLDS visi ssiccsezts cussstscoisiees Gusietien n e o natn anaes 157 Steucture S SMART VALUE Serani a RRRA EEE eatsasiausia T E seiamna stants wiagerd etna ens 158 Structure S XERSWRE V danan n aa a an ai aiai 159 Chapter 3 PCI Integration sssssssssrssresresrrsrrsrrsrrrerrrrrrsrrsrrsereene 161 PET Infestation ennari ei ri ivi stdbeaebansennt edtenateidbosnseantevalessteiteeetavsreestuesnsedesdotevatersbenanenteerieties Initialization and Setup PCI Bus Interfacing ss EEE OTI A EAEE E ET E T E AENDE EEES E E E Chapter 4 Operation ssssssssssrssrssersrrerrrrrrsrrsrrsrrsrrrerrerrrrrrsrrsereent 165 OPETAN aean N a E REEERE ne TERA A EGEA EE EEA EE ti ates Settee TEE IREE Data Recording Recording Data Data Wrap eeseeseeseeeeesees Endine the Recording Apiri iNES ITAAS ASTEI SEA IEI N EARTE NAISES EI ESSEER EREE IE REENE ERA SREE EST 167 DIA BAI NEE AE N E E EEA EAE EINA E AEEA A SA EET 167 Read Setup Read Positioning Readitig Datassist EE AEEA ISS Chapter 5 External POft sssssssssssrssrsrresrrsrrsrrsrrsrrrerrrrrrsrrerrsereene Eae a DTe EN EO t a APEERE EEEE EEEE EEE SEEE OUETDIOW e AEAT Saks sega RR E A A E E AN GONSE Interface Electronics Data Formats vcccecccsevee PIO Sinalar Taterface PUnctions veccs
44. devIndex const char address USHORT port SSHANDLE pxXlrHandle Description XLRNetOpen opens a remote StreamStor device over an Ethernet link and initializes the hardware and firmware in preparation for recording on an external interface The device is transitioned to system ready state if required This function must be called before any other API function if using an Ethernet interface to StreamStor After successful completion of this function the handle pointed to by pXlrHandle can be used for all subsequent API calls NOTE You should call XLRClose even if XLRNet Open returns XLR_FAIL Parametets e devIndex identifies the desired StreamStor to open when multiple StreamStor devices are in use Use 1 for single card systems This is a user defined index value e address is a pointer to an array with a valid IPv4 address in dotted quad notation 3XX XXX XXX XXX he 127 0 0 1 e port indicates which network port the connection to StreamStor should be made on default is 10001 e pXIlrHandle isa pointer to a system handle for initialization Successful completion loads this parameter with a valid handle to the hardware device to use in subsequent API calls pX1rHand1e is assigned the value INVALID_SSHANDLE on failure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 81 CHAPTER 2 FUNCTION REFERENCE
45. directory on the currently selected partition Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value Length of the user directory Usage ULONG xlrAddress SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus char userDirBuff 1024 UINT dirLength UINT offset xlrStatus XLROpen 1 amp xlrDevice dirLength XLRGetUserDirLength xlrDevice if dirLength printf This system does not have a user directory n else offset 0 xlrStatus XLRGetUserDir xlrDevice dirLength offset userDirBuff Close device befor xiting XLRClose xlrDevice See Also XLRSetUserDir XLRGetUserDir XLRSetBankMode and XLRSelect Bank 77 CHAPTER 2 FUNCTION REFERENCE XLRGetVersion Syntax XLR_RETURN_CODE XLRGetVersion SSHANDLE xirDevice PS_XLRSWR pVersion T la lt Description XLRGetVersion gets the API and firmware version information from a StreamStor device Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e pVersionis a pointer to an S_XLRSWREV structure to hold the version strings returned Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_XLRSWVER swVersion char temp XLR_ERROR_LENGTH xlrStatu
46. drives Instead the StreamStor performs simultaneous input and real time output of the data This mode is used in situations where the data must be sampled in real time and recording of the data is not necessary gt SS_SAMPLEMODE_DISABLED disables sampling mode Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 134 CHAPTER 2 FUNCTION REFERENCE Usage define SAMPLE SIZE 0x100000 SSHANDLE xlrDevice XLR_RETURN_CODI xlrReturnCode Ea xlrReturnCode XLROpen 1 amp xlrDevice Configure sampling mode xlrReturnCode XLRSetSampleMode xlrDevice SAMPLE_SIZE SS_SAMPLEMODE_NORMAL See Also XLRGet Sample 135 CHAPTER 2 FUNCTION REFERENCE XLRSetUserDir Syntax XLR_RETURN_CODE XLRSetUserDir SSHANDLE xlrDevice PVOID udirPtr UINT udirSize T Description XLRSetUserDir sets the user directory on the StreamStor recorder The drives must be idle i e no recording or playback in progress to set the user directory If the StreamStor is in bank mode this command will set the user directory only on the selected bank If the StreamStor is partitioned this command will create a user directory on the selected partition Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e udirPtrisa po
47. interpret the values returned please refer to the ATA specifications or to the disk drive vendor s documentation If the StreamStor is in bank mode this command will return the values for the specified drives on the currently selected ba nk This function is only supported on disk drives that support self monitoring You can call XLRGetDrivelInfo then examine the returned SMARTCapable value to determine this Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e versionis the SMART attributes data structure revision number as reported by the disk drive vendor e values isa pointer to an array of SSMARTVALUES structures The array must be large enough to hold XLR_MAX_SMARTVALUES structures e Bus is the ATA bus number of the drive e MasterSlave is XLR_MASTI ER_DRI y E 0 or XLR_SLAVE_DRIVE 1 to select the master or slave drive on the ATA bus Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 102 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice USHORT version XLR_RETURN_CODE xlrStatus S_SMARTVALUES smartVals XLR_MAX _ SMARTVALUES xlrStatus XLROpen 1 amp xlrDevice if XLRReadSmartValues hTarget amp version smartVals 1 XLR_MASTER_DRIVE XLR_SUCCESS printf Smart values not available for Bus 1 Ma
48. op is called or all data has been played The playback length remains in effect until the next XLROpen or until XLRSetPlaybackLength is called again The playback length is used by the XLRPlayback XLRRead and XLRReadToPhy commands Playback length is initially set to zero by XLROpen A playback length of zero causes playback or reading to continue until all data is played or read Note that each time you call XLRPlayback XLRRead or XLRReadToPhy the count of the number of bytes that have already played returns to zero Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e lenHigh is the upper 32 bits of the 64 bit value that identifies the playback length e lenLow is the lower 32 bits of the 64 bit value that identifies the playback length The playback length must be an eight byte aligned value Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 130 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice DWORDLONG bytesToPlay ULONG lenHigh ULONG lenLow S_DEVSTATUS devStatus XLR_RETURN_CODE xlrStatus bytesToPlay 1048576 xlrStatus XLROpen 1 amp xlrDevice lenHigh and lenLow must represent an 8 byte aligned address lenHigh bytesToPlay gt gt 32 lenLow bytesToPlay amp OxXFFFFFFFF xlrReturnCode XLRSetPlaybackLength xlrDevice lenHigh lenLow Sta
49. partition in pages ned tions ocated ilable Partition nCapacity PS_PARTITIONINFO 155 CHAPTER 2 FUNCTION REFERENCE Structure S READDESC typedef struct _READDESC PULONG BufferAddr ULONG AddrHi ULONG AddrLo ULONG XferLength S_READDESC PS_READDESC Purpose This structure is used to define the parameters for a read from or a write to the StreamStor See for example XLRRead and XLRWrite Members e BufferAddr Address of buffer to hold data read from StreamStor Must be at least XferLength bytes e AddrHi High word 32 bit of starting byte address e AddrLo Low word 32 bit of starting byte address e XferLength Number of bytes to transfer from StreamStor 156 CHAPTER 2 FUNCTION REFERENCE Structure S SMARTTHRESHOLDS typedef struct _SMARTTHRESHOLDS UCHAR ID UCHAR Threshold UCHAR Reserved 10 S_SMARTTHRESHOLDS PS_SMARTTHRESHOLDS Purpose This structure is used by the XLRReadSmartThresholds function to return SMART threshold values retrieved from SMART capable disk drives Members For information on interpreting the members of this structure please refer to the ATA specifications or to the disk drive vendor s documentation 157 CHAPTER 2 FUNCTION REFERENCE Structure S SMARTVALUES typedef struct _SMARTVALUES E UCHAR ID USHORT Status UCHAR Current UCHAR W
50. recording is in progress 189 CHAPTER 7 BANK SWITCHING on Bank B and a switch will be done back to Bank A In this case follow these steps to replace the full drive module with a new module 1 Power off the bank containing the full drive module When successfully powered down all lights on the bank will go off 2 Once the lights are off remove the full drive module from the bank 3 Put the new write enabled drive module in the empty bank 4 Power up the bank containing the new drive module On power up StreamStor will initialize the drive module When the initialization has completed the READY light on the bank will light The same procedure can be applied to playback If a recording spans more than two drive modules when playback switches to the second drive module once all data on the first drive module has been played you can replace it with the third module in the set etc You can also use the functions XLRMountBank and XLRDismountBank to mount and dismount banks 190 Chapter 8 Drive Partitioning CHAPTER 8 DRIVE PARTITIONING Drive Partitioning Partitioning allows you to logically divide the StreamStor drives into isolated sections The partitioning feature is included on a variety of StreamStor controllers The hardware manual for your StreamStor controller or daughterboard will indicate if partitioning is supported on it and will provide any other model specific details The StreamStor can
51. to XLRGetUserDirLength The Length of Drive Modules The amount of data recorded on a drive module can be obtained by using any of the following API functions e XLRGetLength the length is returned as a function value e XLRGetDirectory the length is returned in the Length member of the S_DIR structure e XLRGetBankStatus the length is returned in the Length member of the S_BANKSTATUS structure All three of the above functions are bank aware which means that the length returned is the length on the selected bank Note that regardless of the bank mode the length returned by the functions does not include the size of the label if any or the size of the user directory if any 188 CHAPTER 7 BANK SWITCHING Write Protecting Drive Modules By default drive modules are not write protected You can use the XLRSetWriteProtect function to write protect idle drive modules When in non bank mode the write protection applies to the entire collection of drives that are mounted When in bank mode the write protection applies only to the drive module in the selected bank The write protection remains from recording session to recording session even if the drive module has been removed from the system and then reinserted Write protection can be removed by calling the function XLRClearWriteProtect When in non bank mode the write protection will be cleared from the entire collection of drives th
52. written or oral agreements understandings or communications If any provision of this Agreement is deemed invalid under any applicable law it shall be deemed modified or omitted to the extent necessary to comply with such law and the remainder of this Agreement shall remain in full force and effect GOVERNING LAW This Agreement is governed by the laws of the State of Colorado without giving effect to the choice of law provisions therein By accepting this Agreement you hereby consent to the exclusive jurisdiction of the state and federal courts sitting in the State of Colorado 10 Chapter 1 Introduction CHAPTER 1 INTRODUCTION The StreamStor Software Development Kit One of the most powerful features of StreamStor is that it is an open platform device allowing other PCI devices complete access to record or read data from the disk storage Conduant makes it easy for system designers to use StreamStor by providing the StreamStor Software Development Kit SDK This manual is applicable to SDKs with a major number of 8 i e SDK 8 0 SDK 8 1 etc The SDK includes an Application Programming Interface API library This library provides the control software for StreamStor in the form of DLLs Dynamic Link Libraries for Windows and an archive library for Linux that can be accessed by user application software Application software can be developed in any environment capable of utilizing these library functions This includes the vario
53. xlrDevice is the device handle returned from a previous call to XLROpen e WrapEnable should be set to 1 to allow StreamStor to operate as a circular buffer The oldest data will be overwritten if mote data is received than is available on the disk drives To force StreamStor to stop accepting data at the disk storage limits set this parameter to 0 e ZoneRange is not currently supported and should be set to 1 Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 107 Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice Start recording data but ensure that no captured data is overwritten xlrReturnCode XLRRecord xlrDevice 0 1 System is now recording End the recording XLRStop xlrDevice See Also XLRAppend XLRWrite XLRStop XLRSetBankMode XLRSelectBank XLRPartitonSelect XLRSetMode and XLBBindInputChannel CHAPTER 2 FUNCTION REFERENCE XLRRecoverData Syntax XLR_RETURN_CODE XLRRecoverData SSHANDLE xlrDevice IN UINT Mode Description XLRRecoverData attempts to recover data If partitioning was used on the system prior to calling XLRRecoverData you should call XLRPartitionSelect to select the partition that was in use prior to the failure or prior to the overwrite XLRRecoverData does not recover t
54. 0 xlrStatus XLRSelectChannel hTarget 0 E Bind PCI Bus channel 0 as output channel xlrStatus XLRBindOutputChannel hTarget 0 pBuf PULONG malloc BUFFER_SIZE Build the read descriptor to read some data startAddress 4096 sRead AddrHi UINT startAddress gt gt 32 sRead AddrLo UINT startAddress amp OXFFFFFFFF sRead BufferAddr pBuf sRead XferLength BUFFER_SIZE Read a buffer xlrStatus XLRRead hTarget amp sRead printf Read Complete n XLRClose hTarget free pBuf pBuf NULL exit 0 183 Chapter 7 Bank Switching CHAPTER 7 BANK SWITCHING Bank Switching The Big River TK200 TK200 is a rack mounted StreamStor storage system It features two hot swappable 8 drive modules that can be used to record continuously The bank switching feature is available only on the Big River TK200 Bank switching is used to control drive modules in separate banks as if they were contiguous units in a recording A bank is a rack containing a drive module The TK200 has two banks referred to as Bank A and Bank B Each bank can hold a drive module and each drive module can hold up to four pairs of master slave drives for a total of eight drives Therefore a TK200 can support a maximum of 16 drives You can play or record data from the drive module in one bank while the other bank is idle or dismounted Setting
55. 2 FUNCTION REFERENCE XLRClose Syntax void XLRClose SSHANDLE xlrDevice Description XLRClose closes the StreamStor device This should be called before exiting an application that has opened a StreamStor device with XLROpen No other application can open the StreamStor device until this function has been called Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value None Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrStatus 7 Open the devic xlrStatus XLROpen 1 amp xlrDevice Close device befor xiting XLRClose xlrDevice See Also XLROpen 35 CHAPTER 2 FUNCTION REFERENCE XLRDeleteAppend Syntax XLR_RETURN_CODE XLRDeleteAppend SSHANDLE xlrDevice ULONG AddrHigh ULONG AddrLow Description XLRDeleteAppend deletes the last appended data set on the StreamStor device An appended data set is defined as the data recorded to StreamStor with the XLRAppend function An optional address can be provided to define the new last append start point Zero should be used for the address in most circumstances The new last append address must be an eight byte aligned value If the StreamStor is in bank mode this command will delete appended data from the currently selected bank Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e AddrHighis the upper 32 bi
56. 2 FUNCTION REFERENCE XLRGetEventsLength Syntax UINT XLRGetEventsLength SSHANDLE xlrDevice Description XLRGetEventsLength returns the number of events that have been captured as a result of setting one or more event options when calling the XLRSetDBMode function Le calling XLRSetDBMode with option set to SS_OPT_EVENTLOG bit wise inclusively or ed with an SS_OPT_EV Parametets ENT_ option e xI1rDevice is the device handle returned from a previous call to XLROpen Return Value e The number of events that have been captured Usage SSHANDL UINT XLR_RETURN_COD H1 Ct x lrHandle numberOfEvents 0 x rReturn xlrStatus XLROpen 1 amp xlrDevice Capture events numberOfEvents XLRGetEventsLength xlrHandle See Also XLRSetDBMode XLRRetrieveEvents and XLRGetEvents 60 CHAPTER 2 FUNCTION REFERENCE XLRGetFIFOLength Syntax T DWORDLONG XLRGetFIFOLength SSHANDLE xlrDevice Description XLRGetFIFOLength returns the amount of data currently in the FIFO This function is only valid when StreamStor is in a forking or pass thru mode SS_MODE_FORK SS_MODE_PASSTRHU If StreamStor is not in one of the modes listed above or is not currently moving data XLRGetFIFOLength will return 0 T Parameters e xlrDevice is the device handle returned fr
57. AAAA RAN RAEE KO REER RRRA A 47 XER Get Base Ade asierto adai da daadaa aei adain 48 IER Gr Ct BASE RAN E eneonen E O ERR E E EE ss 49 MEER Get BIH fore cesicesicvets nnani i rei ai ie sri s aR aeS E S S ESDS AEE a aS iaai aiSia aei 50 XERGetChassis L ype ssciesecsssscssssssssesaivssinie cesssnsniovedssssnvedess vandoveivsnanie detssesndodessensasesesstosusnsetocssevedotededndededeigarvess 51 XTERG ETD EVICEI MO sexs zivscs cottvcssobsaue sive cave hvisanadiud dave Hane caucus sis Sava sane EEE R a devs dans Sovesths 52 KDR Get De vices Cats ara ae E OERE AEA EARRA AAA AN At 53 RULRG etl irectory i ciiccticcisccticcsesssssstevasavasassavavsvaavasaaaavavacavavasavavavavacssasassvnssosssesstesetessteseseebseibasnaeaanaiaays 54 MERGetD rive laso icc pn E E E E EE EE E EAA A an 55 MLRGetDrive Temp sscisscccsccoratassenssarsssantsvatssnsnssvasssvansvatesvenssvarsovanvevatunscasssanssvanspsacbasonssdarsevansanatvassnsaaanseveneaee 56 DOR Ge Ct THOT Mes Sa E mioaa aa aaea ae atase de dated atrae eaaa steed dh deeded 57 IC RG CEE VERS aaa RA 58 MUERGetHivents Len eth imisi ia ii i E iD E as sa 60 KER GetPIBOL N Sth se ssssesescsssansevesvsesniesesssesnssieissnanieietesvaniovesvsvandovetsiessdoveivssanvo ders esnaesese dese EAE 61 KERGetlabel E EE EEEE EESE EEEE eta the EEE tian 62 BG SG roy BKSA ah a 209 EAE E E E E EE 63 KIER Get E ET a E S EE 64 XERGetLenoth kow lio henri i RR RRR RE ARAE T E E E 65 KUERGetlemeth Pages ss ssssssesesssesrioresssessisret
58. Bank Mode The TK200 can operate in bank mode or non bank mode When in non bank mode the TK200 operates the same as a non TK200 system namely the drives in the drive modules are read and written as if they were a single set Only StreamStor systems with a TK200 chassis support bank mode The chassis type can be determined by calling the API function XLRGetChassisType Currently the chassis type returned is either TK200 or UNKNOWN_CHASSIS_TYPE When in bank mode the drives in each drive module ate recorded independently That is a recording made on the drives on Bank A is independent of the recording made on the drives on Bank B In this mode you can load a single bank with a drive module or both banks with drive modules and begin recording or playback The API function XLRSetBankMode is used to enable or disable bank mode on the TK200 By default bank mode is disabled you must call XLRSetBankMode to enable it StreamStor PCI 816V100 and PCI 816VXF2 boards are an exception By default they are bank mode enabled To enable bank mode the StreamStor recorder must be idle not recording or playing data When a StreamStor is in bank mode it stays in bank mode until XLRSetBankMode is called to take it out of bank mode or the StreamStor card is reset Assume both banks are loaded with drive modules When the drive module in Bank A is full you could switch recording to Bank B While Bank B is 185 CHAPTER 7
59. EESE aaen Creatine A Patton ara iea a EA a E AE A R E Selecao A POTION ca i AOR A tis sta A O E aA Getting Partition Information Bank Mode and Partitioning RROCOPAING usine Paranoias an a a a a a aa eats Removing Partitioning PA ae Reusing Pann sind EE E A T E iniaauia hina aniel han O N aes RAL AUA fesse A E E E S Sse Lt User Directories and Partitions PE IEA AE E EEE E E EE AE E EE E E T E AT E E A AEE Chapter 9 Forking and PassthrU sssssssssssssrssrrerrrrrrrrrsrrsereereere 201 Fotkino and Passer cvccsecsceccsscsuotesssanssstecnsssetorneededonctveuteesatetscaenstsducrtetetusvetteretensseshavavevor stats iTe 202 Overview Forking ossos PASI cenne ao Output over the PCT bus suss Checking the FIFO length Ending a FIFO operation E E A AN sees vaay seuss gevageases vans aeognocastunndovorgtapvacatas tasaeteaed Chapter 10 Technical SUpport ssssssssssssrsssrsrrsrrrsrrerrrrrrsrrsrrsersene Technical Sup port oe aeeoe aee teatir EEEE EE AE e eE AEEA REAA a E EEEE A EEA EEEE Gontactenig Techical SUPOT eres oan EE EEEE O an Ca E cdot cael ea dual ccde Sac NEE Cae de ees 207 Appendix A Error CodeS ssssssssssessessrrsrrrrrrsrrsrrsrrerrrerrerrrrerree 209 License Agreement and Limited Warranty IMPORTANT CAREFULLY READ THE TERMS AND CONDITIONS OF THIS AGREEMENT BEFORE USING THE PRODUCT By installing or otherwise using the StreamStor Product you agree to be bound by the terms of this Agreement If you do not ag
60. Edit FUNCTION REFERENCE Syntax XLR_RETURN_CODE pReadDesc Description XLR T XLREdit SSHANDLE xlrDevice PS_READDESC Edit edits data from the StreamStor device by overwriting existing data specified by the AddrHi AddrLo and XferLength structure members of pReadDesc with new data contained in the buffer pointed to by the BufferAddr structure member of pReadDesc The edit address of the requested data must be an eight byte aligned value If the StreamStor is in bank mode this command will edit the data on the currently selected bank If the StreamStor is partitioned this command will edit the data on the currently selected partition Parametets x1rDevice is the device handle returned from a previous call to XLROpen pReadDesc is a pointer to an S_READD and buffer address containing the new data to overwrite the existing data Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSH AN DLE S_REA ULO XLR_R DDE NG Ld xlr Re x ESC structure that holds the edit address length lrDevice readDesc myBuffer 40000 x ETURN_COD turnCode rReturnCode XLROpen 1 amp xlrDevice Fill buffer with new data here AddrHi readDesc AddrHi readDesc AddrLo readDesc XferLength sizeof myBuffer
61. GetBankStatus Syntax XLR_RETURN_CODE T XLRGetBankStatus SSHANDLE 25 UI xlrDevice NT bankID PS_BANKSTATUS pBankStatus Description XLRGetBankStatus retrieves information from the StreamStor about the specified bankID The StreamStor must be in bank mode to get the status of a bank XLRGetBankStatus can be called when the StreamStor is not idle Parameters e xl rDevice is the device handle returned from a previous call to XLROpen e bankID isa constant indicating the bank to report on BANK_A ot BANK_B e pBankStatus is a pointer to an S_ Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_BANKSTATUS AbankStatus S_BANKSTATUS BbankStatus XLR_RETURN_CODE xlrStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetBankMode xlrDevice xlrStatus XLRGetBankStatus xlrDevice xlrStatus XLRGetBankStatus xlrDevice if AbankStatus MediaStatus printf BANK A is full n if BbankStatus MediaStatus printf BANK B is full n See Also XLRGetDeviceStatus 47 SS_BANKMODE_NORMAL BANKSTATUS structure E amp AbankStatus amp BbankStatus BANK_A BANK_B MEDIASTATUS_FULL MEDIASTATUS_FULL XLRSe
62. GetErrorMessage errMessage XLRGetLastError printf Error setting the mode s n errMessage XLRClose xlrDevice exit 1 xlrStatus XLRBindInputChannel xlrDevice 0 if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Error setting the mode s n errMessage XLRClose xlrDevice exit 1 88 CHAPTER 2 FUNCTION REFERENCE xlrStatus XLRBindOutputChannel xlrDevice 0 if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Error setting the mode s n errMessage XLRClose xlrDevice exit 1 recordingLength XLRGetLength xlrDevice if recordingLength printf No data to playback n XLRClose xlrDevice exit 0 Set the FPDP mode SS_FPDP_XMIT does not drive the clock xlrStatus XLRSetDBMode xlrDevice SS_FPDP_XMIT 0O if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Error setting FPDP mode s n errMessage XLRClose xlrDevice exit 1 An offset of zero starts playback at the beginning offset 0 AddrHi offset gt gt 32 AddrLo offset amp OxFFFFFFFF Start the playback xlrStatus XLRPlayback xlrDevice AddrHi AddrLo if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Erro
63. IL_BUS1_ Master drive on Bus 1 missing or MASTER failing 163 XLR_ERR_DRVFAIL_BUS1_ Slave drive on Bus 1 missing or SLAVE failing 164 XLR_ERR_DRVFAIL_BUS2_ Master drive on Bus 2 missing or MASTER failing 165 XLR_ERR_DRVFAIL_BUS2_ Slave drive on Bus 2 missing or SLAVE failing 166 XLR_ERR_DRVFAIL_BUS3_ Master drive on Bus 3 missing or MASTER failing 167 XLR_ERR_DRVFAIL_BUS3_ Slave drive on Bus 3 missing or SLAVE failing 168 XLR_ERR_DRVFAIL_BUS4_ Master drive on Bus 4 missing or MASTER failing 169 XLR_ERR_DRVFAIL_BUS4_ Slave drive on Bus 4 missing or SLAVE failing 170 XLR_ERR_DRVFAIL_BUS5_ Master drive on Bus 5 missing or MASTER failing 171 XLR_ERR_DRVFAIL_BUS5_ Slave drive on Bus 5 missing or SLAVE failing 172 XLR_ERR_DRVFAIL_BUS6_ Master drive on Bus 6 missing or MASTER failing ATS XLR_ERR_DRVFAIL_BUS6_ Slave drive on Bus 6 missing or SLAVE failing 174 XLR_ERR_DRVFAIL_BUS7_ Master drive on Bus 7 missing or MASTER failing T79 XLR_ERR_DRVFAIL_BUS7_ Slave drive on Bus 7 missing or SLAVE failing 211 APPENDIX A ERROR CODES
64. ION DAMAGES FOR LOSS OF BUSINESS PROFITS BUSINESS INTERRUPTION LOSS OF BUSINESS INFORMATION OR ANY OTHER PECUNIARY LOSS ARISING OUT OF THE USE OF OR INABILITY TO USE THE STREAMSTOR PRODUCT AND THE SOFTWARE IN ANY CASE CONDUANT CORPORATION S ENTIRE LIABILITY UNDER ANY PROVISION OF THIS AGREEMENT SHALL BE LIMITED TO THE AMOUNT ACTUALLY PAID BY YOU FOR THE STREAMSTOR PRODUCT AND THE SOFTWARE BECAUSE SOME STATES AND JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY THE ABOVE LIMITATION MAY NOT APPLY TO YOU RESALE If you are authorized to resell the StreamStor Product you must distribute the StreamStor Product only in conjunction with and as part of your product that is designed developed and tested to operate with and add significant functionality to the StreamStor Product you may not permit further distribution or transfer of the StreamStor Product by your end user customer you must agree to indemnify hold harmless and defend Conduant Corporation from and against any claims or lawsuits including attorneys fees that arise or result from the use or distribution of your product and you may not use Conduant Corporation s name logos or trademarks to market your product without the prior written consent of Conduant Corporation ENTIRE AGREEMENT SEVERABILITY This Agreement constitutes the complete and exclusive agreement between you and Conduant Corporation with respect to the subject matter hereof and supersedes all prior
65. LE Device reference by handle already opened 19 XLR_ERR_INVALIDINDEX Invalid card index value 20 XLR_ERR_DEVICELOCK Could not lock device for exclusive access 2N XLR_ERR_DETECTCARD Card configuration invalid 22 XLR_ERR_BUFLOCK Could not lock user memory buffer 23 XLR_ERR_READFAIL Data read error 24 XLR_ERR_WRITERAM Firmware write to device memory APPENDIX A ERROR CODES failed 101 XLR_ERR_INVALID_LENGTH An invalid or unaligned transfer length was requested must be 64 bit aligned 102 XLR_ERR_SYSBUSY System is busy Use XLRStop to before sending other commands 103 XLR_ERR_CMDFAIL The controller has failed to execute the command 104 XLR_ERR_FILENOTFOUND A required file was not found 105 XLR_ERR_LOADKEY A required registry key was not found 106
66. Open 1 amp xlrDevice XLR_SUCCESS printf Error Open failed u n XLRGetLastError exit 1 if XLRPartitionSelect xlrDevice 4 XLR_SUCCESS printf Error PartitionSelect failed u n XLRGetLastError exit 1 See Also XLRPartitionCreate and XLRGetPartitionInfo 86 CHAPTER 2 FUNCTION REFERENCE XLRPlayback Syntax XLR_RETURN_CODE XLRPlayback SSHANDLE xlrDevice ULONG Addrhigh ULONG Addrlow Description XLRPlayback puts StreamStor into playback mode where data is made available for transfer to an outside device The supplied address will be used to set the starting point of the data to be made available for transfer Playback continues until e XLRStop is called to halt the playback or e all data is played back or e aplay limit see XLRSet PlaybackLength is reached This function can be used for streaming data out the external FPDP or SFPDP port or it can be used in conjunction with XLRSetReadLimit to allow a PCI device to source data from StreamStor The playback address must be an eight byte aligned value If the StreamStor is in bank mode this command will play back data from the currently selected bank If data was recorded on multiple channels before playing back data you must first select the channel upon which the data was recorded and then bind it as the input channel Parametets e xI1rDevice is the device handle re
67. PDP xlrDevice XLR_SUCCESS exit 1 Waiting for SYNC pulse data will be recorded to disk as soon as SYNC is received See Also XLRSetDBMode XLRRecord and XLRAppend 27 CHAPTER 2 FUNCTION REFERENCE XLRBindInputChannel Syntax XLR_RETURN_CODE XLRBindInputChannel SSHANDLE xlrDevice UINT channel Description XLRBindInputChannel binds a channel for input INTO StreamStor In other words input is relative to StreamStor To record on a particular channel that channel must be bound to StreamStor via this command XLRClearChannels must be called to unbind the channel s before calling XLRBindInputChannel Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e channel is the channel number to bind this is card specific Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Note CHANGING MODES CLEARS ALL INPUT AND OUTPUT CHANNELS CHANNELS MUST BE BOUND AFTER THE MODE IS SELECTED Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice Set StreamStor mode to Single Channel xlrStatus XLRSetMode xlrDevice SS_MODE_SINGLE_CHANNEL xlrStatus XLRClearChannels xlrDevice For input over the PCI bus bind to channel zero xlrStatus XLRBindInputChannel xl
68. PDP T on that bus at a time Otherwise bus drivers may be permanently damaged 1 StreamStor always provides series termination on the DATA signals as described in Permission 6 4 1 of the ANSI specification 173 CHAPTER 5 EXTERNAL PORT PSTROBE PSTROBE and STROB Signals When in FPDP TM and FPDP RMCM modes StreamStor will drive and terminate both the differential clock pair of PSTROBE PSTROBE PECL Data Strobe and the single ended STROB Data Strobe TTL clock When in any other mode the user will select which of the two FPDP clock sources StreamStor should use from the FPDP bus The clock can be selected by calling XLRSetDBMode with the desired clock option For example to enable the data strobe clock TTL on a PCI 816XF2 XLRSetDBMode device SS_FPDP_RECV SS_OPT_FPDPSTROB Refer to the FPDP ANSI standard for recommendations and observations about the use of these signals 174 Chapter 6 Channel Description and Selection CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION Channel Description and Selection StreamStor boards have one or more data paths or channels that can be used to input and output data to from the StreamStor board The number of channels available depends on the board type For example the PCI 816XF2 has three channels the PCI Bus the FPDP top connector and the FPDP front connector The hardware manual for your StreamStor controller or daughterboard describes what channels are
69. R 1 INTRODUCTION The program sstest is similar to the Windows configuration test sscfg exe It will attempt to initialize and configure the StreamStor and perform a confidence test The confidence test will write data to the StreamStor storage and then will read that data J x CAUTION Running the confidence test sstest WILL overwrite any recorded data on StreamStor storage To execute sstest Les 2 cd lt InstallDir gt linux util sstest If the confidence test completes successfully you should see output similar to the following Getting Device Info Board Type PCI 816xXF2 Serial Number 5109 Number of drives 8 Total Capacity 320083329024 Getting Version Info API Version 6 02 API Datecode Oct 07 2005 Firmware Version 11 14 Firmware Datecode Oct 07 2005 Monitor Version 6 02 XBAR Version 3 20 ATA Version 1 05 Ultra ATA Version 0 00 Driver Version 700 Processing Test Script Script processing complete Starting Test Basic Confidence Test gt Writing test pattern gt Write Completed Check Directory Dir Length 0x2000000 gt Read Compare Recorded Data gt Read Compare Completed Basic Confidence Test Completed 20 CHAPTER 1 INTRODUCTION If you get any error messages running this test please follow the instructions in the Troubleshooting section If this test completes successfully your StreamStor system is functioning normall
70. SetLabel xlrDevice label Close device befor xiting XLRClose xlrDevice See Also XLRSetLabel XLRErase XLRSetBankMode and XLRSelectBank 62 CHAPTER 2 FUNCTION REFERENCE XLRGetLastError Syntax XLR_ERROR_CODE XLRGetLastError void T Description XLRGetLastError returns the error code of the most recent API failure This function should always be called immediately after any StreamStor API function call that returns failure It is not meaningful to call XLRGet LastError if the last StreamStor API function call was successful In this case the returned error code will be error code 3 KLR_ ERR_NO NFO Parametets None Return Value This function returns the error code Error codes are listed in Appendix A Usage SSHANDLE xlrDevice XLR_ERROR_CODE xlrError char errString XLR_ERROR_LENGTH xlrStatus XLROpen 1 amp xlrDevice xlrReturn XLRGetDirectory xlrDevice amp xlrDir if xlrReturn XLR_SUCCESS xlrError XLRGetLastError XLRGetErrorMessage errString xlrError printf Error message s n errString exit 1 See Also XLRGetErrorMessage 63 CHAPTER 2 FUNCTION REFERENCE XLRGetLength Syntax DWORDLONG XLRGetLength SSHANDLE xlrDevice Description XLRGetLength returns the length in bytes of the cur
71. This structure holds various system status flags as returned by the XLRGetDeviceStatus function Note The array index value is always 0 for RecordActive ReadActive VRActive and Overflow Members SystemReady System ready flag indicates the system firmware and hardware have been initialized successfully BootmonReady Power on boot flag indicates that the system boot succeeded and the system is ready for initialization XLROpen Recording Indicates that the system is currently in a record mode Playing Indicates that the system is currently in a playback mode Reservedil Reserved2 Reserved3 and Reserved4 not used RecordActive If not in bank mode element 0 indicates that the system is currently recording If in bank mode element 0 indicates that BANK A is currently recording and element 1 indicates that BANK B is currently recording ReadAct ive If not in bank mode element 0 indicates that the system is currently reading If in bank mode element 0 indicates that BANK A is currently reading and element 1 indicates that BANK B is currently reading 150 CHAPTER 2 FUNCTION REFERENCE e FifoActive Indicates that the system is currently in FIFO mode e DriveFail Indicates that a drive has failed e DriveFailNumber Indicates the drive that has failed Valid when DriveFail is TRUE CI e SysError Indicates that system initialization failed CI e SysErrorCode Holds initia
72. Ultra ATA controller version e DriverVersion Driver version 159 Chapter 3 PCI Integration CHAPTER 3 PCI INTEGRATION PCI Integration To allow maximum bandwidth for recording digital data over the PCI bus StreamStor is designed for direct card to card data transfers Since many data acquisition cards already perform DMA operations directly to system memory the StreamStor controller uses this capability for the direct transfer of data The software development kit provides the necessary control functions for integration of StreamStor into user applications Initialization and Setup Initialization requires a call to the XLROpen function This function will lock the device for exclustve access and initialize the recording system The initialization routine includes locating the StreamStor controller on the PCI bus downloading software and initializing required data structures etc PCI Bus Interfacing Although the PCI bus itself has been designed for card to card transactions most operating systems have no provisions for this functionality In addition most operating systems do not have provisions for real time event management which is required when recording data at high bandwidths For these reasons there may be a requirement to modify existing device drivers for the PCI card that is to send data to the StreamStor system The StreamStor controller requests a memory mapped window during computer booting providing a m
73. Usage SSHANDLE xlrHandle ULONG xlrError char errString XLR_ERROR_LENGTH if XLRNetOpen 1 127 0 0 1 10001 amp xlrHandle XLR_SUCCESS xlrError XLRGetLastError XLRGetErrorMessage errString xlrError printf s n errString XLRClose xlrHandle exit 1 XLRClose xlrHandle See Also XLRClose 82 CHAPTER 2 FUNCTION REFERENCE XLROpen Syntax T T XLR_RETURN_CODE XLROpen UINT devIndex SSHANDLE pXlrHandle Description XLROpen opens a StreamStor device and initializes the hardware and firmware in preparation for recording The device is transitioned to system ready state if required This function must be called before any other API function After successful completion of this function the handle pointed to by pX1rHandle can be used for all subsequent API calls NOTE You should call XLRClose even if XLROpen returns XLR_FAIL Parametets e deviIndex identifies the desired StreamStor to open when multiple StreamStor devices are in use Use 1 for single card systems Use XLRDeviceFind to find the number of devices installed e pXlrHandle isa pointer to a system handle for initialization Successful completion loads this parameter with a valid handle to the hardware device to use in subsequent API calls pX1rHand1e is assigned the value INVALID_SSHANDLE on failure Return Value On success this function returns XLR
74. XLRMountBank will power up the selected bank A dismounted bank can also be re powered by a key off on transition A mounted bank can be powered off by a key on off transition or by calling XLRDismountBank If you attempt to mount a bank that is already mounted no action is taken and XLR_SUCCESS is returned Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e bankID isa constant indicating the bank to be mounted BANK_A or BANK_B Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus S_BANKSTATUS AbankStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetBankMode xlrDevice SS_BANKMODE_NORMAL xlrStatus XLRGetBankStatus xlrDevice BANK_A amp AbankStatus if AbankStatus MediaStatus MEDIASTATUS_FULL printf BANK A is full Wait for bank to dismount n printf then insert new bank module into BANK A n xlrStatus XLRDismountBank xlrDevice BANK_A Wait for new bank to be inserted xlrStatus XLRMountBank xlrDevice BANK_A See Also XLRDismountBank XLRGetBankStatus XLRSet BankMode and XLRSelectBank 80 CHAPTER 2 FUNCTION REFERENCE XLRNetOpen Windows Only Syntax XLR_RETURN_CODE XLRNetOpen UINT
75. _SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrHandle XLR_RETURN_CODE xlrReturnCode ULONG xlrError char errString XLR_ERROR_LENGTH xlrReturnCode XLROpen 1 amp xlrHandle if xlrReturnCode XLR_SUCCESS xlrError XLRGetLastError XLRGetErrorMessage errString xlrError printf s n errString XLRClose xlrHandle exit 1 XLRClose xlrHandle See Also XLRClose XLRDeviceFind XLRSetBankMode and XLRSelectBank 83 CHAPTER 2 FUNCTION REFERENCE XLRPartitionCreate Syntax XLR_RETURN_CODE XLRPartitionCreate SSHANDLE xlrDevice DWORDLONG length T Description XLRPartitionCreate will create a new partition following any previously created partitions A maximum of XLR_MAX_PARTITIONS partitions are allowed Note that you cannot create a partition at a specific offset on the StreamStor device Instead the StreamStor will determine where to create the partition The size of the partition that is created will not be exactly the size requested i e it will not equal length Because of hardware limitations etc the size of the partition is rounded up to certain block boundaries so it will be bigger than length Also note that each partition created has overhead associated with it Therefore the total capacity of a system is not available for partitioning sinc
76. amStor cards on the system printf No StreamStor cards detected n See Also XLROpen 38 CHAPTER 2 FUNCTION REFERENCE XLRDismountBank Syntax XLR_RETURN_CODE XLRDismountBank SSHANDLE xlrDevice UINT bankID Description XLRDismountBank will power down the selected bank A bank can also be dismounted by a key on off transition A dismounted bank can be re powered by a key off on transition or by calling XLRMountBank If you attempt to dismount a bank that has already been dismounted no action is taken and XLR_SUCCESS is returned Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e bankID isa constant indicating the bank to be dismounted BANK_A or BANK_B Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus S_BANKSTATUS AbankStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetBankMode xlrDevice SS _BANKMODE_ NORMAL xlrStatus XLRGetBankStatus xlrDevice BANK_A amp AbankStatus a f AbankStatus MediaStatus MEDIASTATUS_FULL printf BANK A is full n xlrStatus XLRDismountBank xlrDevice BANK_A See Also XLRMountBank XLRGetBankStatus XLRSetBankMode and XLRSelectBank 39 CHAPTER 2 XLR
77. applied to the currently selected bank Reusing Partitions You cannot delete a specific partition However you can delete the data within the partition You can then reuse the partition To accomplish this first call XLRPartitionSelect to select the partition that contains the data to be deleted Then call XLRErase with the SS_OVERWRITE_NONE option 194 CHAPTER 8 DRIVE PARTITIONING Resizing Partitions Partitions cannot be resized User Directories and Partitions User directories can be created as follows gt If the StreamStor device is not partitioned and is not in bank mode then you can only create one user directory gt If the StreamStor device is not partitioned and is in bank mode then you can create a user directory for each bank gt If the StreamStor device is partitioned then you can create a user directory for each partition The user directory functions XLRSetUserDirectory XLRGetUserDirLength and XLRGetUserDir are partition specific So you must first select the partition to be operated upon and then call the user directory functions 195 CHAPTER 8 DRIVE PARTITIONING Example The following C code shows some of the features of partitioning This example demonstrates some of the partitioning features of the StreamStor include lt stdio h gt include lt stdlib h gt include lt string h gt include xlrapi h
78. at are mounted When in bank mode the write protection is cleared only from the drive module in the selected bank Note that the write protection is only recognized by StreamStor recorders it is not recognized by other systems Erasing Drive Modules The command XLRErase is used to erase data on the StreamStor recorder When in non banking mode the entire collection of drives is erased When in bank mode the erasure applies only to the drive module in the selected bank The drives must be idle in order to perform the erase There are several options to XLRErase When in bank mode note that e If the drive module in the selected bank is write protected XLRErase will have no effect on it e Ifthe XLRErase option SS_OVERWRITE_DIRECTORY is used the user directory on the selected drive module will be deleted The label on the selected drive module will be replaced with the default label Getting Bank Status Use XLRGetBankStatus to get the status of selected bank This function will return the selected bank s status in a structure of type S_BANKSTATUS For details on this structure see the structure definition at the end of the Function Reference section of this manual Replacing a Drive Module As drive modules fill up during a recording you may want to replace the full modules with empty or otherwise writable drive modules This becomes necessary for instance when Bank A becomes full
79. ates on the currently selected or selected and bound channel Examples of channel specific commands are LRGetDirectory LRGetLength e x xK Xx LRGetLengthPages In the case of XLRGetLength if data on the StreamStor was recorded in multi channel mode it will return the length of data recorded on the currently selected channel Programming examples of multi channel recording and playback can be found in the Examples directory of the SDK distribution 179 CHAPTER 6 CHANNEL DESCRIPTION AND SELECTION Example 1 The following C code shows how to set up the PCI Bus channel 0 as an input channel to record and then read the data back is not shown ae include files include lt stdio h gt include xlrapi h define START _ADDRESS 0x100000 void main SSHANDLE xlrDevice S_READDESC sRead PULONG pBuf NULL DWORDLONG dwAddress 0 XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice Set StreamStor mode to Single Channel xlrStatus XLRSetMode xlrDevice SS _MODE_SINGLI through the PCI Bus channel 0 For simplicity error handling E CHANNEL Channels must be cleared prior to binding clears the input and the output channels xlrStatus XLRClearChannels xlrDevice Select channel zero to begin recording on xlrStatus XLRSelectChannel xlrDevice 0
80. ccescseccssscecsscessssscsssssessssess PSTROBE PSTROBE and STROB Signals Chapter 6 Channel Description and Selection 175 Channel Description and Selection Channel Description Selecting an Operating Modes sissies a EE ensue E Se iets aden lose E iain RE tase eee dese cade Cheating Selecting and Binding Channels irii ora aenea a EA LEENE A aah RETA 177 SFPDP Multi channel Commands EROE E EE PEA E A A E A E E RAO ESME REE E A E A EA SA Chapter 7 Balik S Wit MinO ccs lesentten dere aed ea ioieondatheteotest Bank Switching lt s ssssseissssesseieissnsaiovesssninieiedsivsaievedesnieietetsindeievedessieieiedsivieiedosadeshsasovesasnseshdeisiedeiedaivvasededeanied OYE Lad Bank MONO RE REESE OT IcEE OT TOR SEERA EP ATIC TRT ee AT TOUTE AT OT AT TER TCICA AIT PCH PCPCRE RPE ATIC OTT OR S CLOUD a BNR rE EE EE et oaussaued ues Saacaruedenssesavathe ty A E A AN Recording a Drive Module ssns Playing back from a Drive Module Tabiin Pive Modals ne si ciate E a a Wee seh cin nails Lan E E ANG Werinno a User DIT OVSE E REE A TEE EE AT ETT The Length of Drive Modules ies si Write Prorecting Drive Module ie einsa a secession EEEE aE EAIA AESA aAa ANE e SAAE EA EAEE TEENS 189 Erino Drive Modules E An stots O ER a a O ar a a ia asots Getting Bank Status Replacing a Drive Module Chapter 8 Drive Partitioning ssssssssssssrsssrsrrsrrsrrrerrrrrrsrrsrrsrreene 191 Drive ParitoniNg iaieineea eri nra nri ari eri ans n SANKS irur STN irr aN SEN
81. cord mode XLRRecord or XLRAppend before calling this function Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e pWriteDesc is a pointer to an S_READDESC structure that holds the length and buffer address of the write data Note that the AddrHigh and AddrLow parameters are ignored If the StreamStor is in bank mode this command will write data to the currently selected bank If the StreamStor is partitioned this command will write to the currently selected partition XLRWrite is not supported in multi channel mode since multi channel mode is not supported over PCI Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_READDESC writeDesc ULONG myBuffer 40000 writeDesc XferLength sizeof myBuffer writeDesc BufferAddr myBuffer Open StreamStor if XLROpen amp xlrDevice 1 XLR_SUCCESS return 1 Put StreamStor into record mode if XLRRecord xlrDevice 0 1 XLR_SUCC return 1 Gl wn Wn Fill the memory here 143 CHAPTER 2 FUNCTION REFERENCE Write the buffer to StreamStor if XLRWrite xlrDevice amp writeDesc return 1 See Also XLRRecord XLRAppend XLRWriteData XLRSelectBank 144 XLR_SUCCESS T XLRSetMode XLRSet BankMode and CHAPTER 2 FUNCTION REFERENCE
82. ct _DRIVEINFO char Model XLR_MAX_DRIVENAME char Serial XLR_MAX_DRIVESERIAL char Revision XLR_MAX_DRIVEREV UINT Capacity BOOLEAN SMARTCapable BOOLEAN SMARTState S_DRIVEINFO PS_DRIVEINFO Purpose This structure is used by the XLRGetDriveInfo function to return information about the disk drives on the StreamStor system Members e Model Model name as reported by the disk drive identify command e Serial Drive serial number as reported by the disk drive identify command e Revision Drive revision level as reported by the disk drive identify command e Capacity Drive capacity as reported by identify command Value is number of 512 byte sectors e SMARTCapable Indicates whether the drive has SMART capabilities SMART is Self Monitoring Analysis and Reporting Technology You can query drives with this technology and determine if they are faulty If SMARTCapab1e is TRUE the drive has this feature Otherwise the drive does not have this feature e SMARTState On drives that are SMARTCapabl e this structure member is used to indicate the drive s state If SMARTState is TRUE the drive is good Otherwise the drive is faulty The value of this structure member is only valid if SMARTCapab1e is TRUE 153 CHAPTER 2 FUNCTION REFERENCE Structure S EVENTS typedef struct _EVENTS UINT Source UINT
83. ctBank XLRSetMode and XLRSelectChannel 66 CHAPTER 2 FUNCTION REFERENCE XLRGetMode Syntax XLR_RETURN_CODE XLRGetMode SSHANDLE xlrDevice SSMODE pMode T T Description XLRGetMode returns the input output path or port mode on the StreamStor recorder where the mode was previously set with the XLRSetMode command Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e pmode isa pointer to an SSMODE variable that will receive the mode Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrHandle XLR_RETURN_CODE xlrStatus SSMODE portMode xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRGetMode xlrDevice amp portMode if portMode SS_MODE_ SINGLE CHANNEL printf In single channel mode n See Also XLRSetMode 67 CHAPTER 2 FUNCTION REFERENCE XLRGetOption Syntax XLR_RETURN_CODE XLRGetOption SSHANDLE xlrDevice UINT options_to_get PBOOLEAN options_on Description XLRGetOption is used to determine if one or more options are set Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e options_to_get isa vector of options to query e options_on is the returned BOOLEAN indicating if all the options in option
84. d is called to start data flowing even though no disk recording takes place Output over the PCI bus amp NOTE Using the PCI bus as an output channel differs from single channel reads in that calls to XLRReadFIFO are required XLRReadF IFO retrieves data from StreamStor to the user provided buffer similar in operation to XLRReadData XLRReadFIFO first ensures that the amount of data available in StreamStor s FIFO is greater than or equal to the amount of data requested If there is not enough data present XLRReadF IFO will wait up to 5 seconds for enough data to complete the request Should not enough data be present after 5 seconds XLRReadFIFO will return status XLR_FAIL Subsequent calls to XLRGet LastError and XLRGetErrorMessage will yield a no data error A no data error does not necessarily mean that there are 0 bytes to be read only that there are fewer bytes than the requested size Checking the FIFO length Ending a The StreamStor SDK provides the XLRGetFIFOLength function to provide the real time ability to check the amount of data that is available for output This function returns a 64 bit integer that is the number of bytes available for reading at that time This function is provided for informational purposes and is primarily used in the situation where input data flow is slow enough that the XLRReadF IFO timeout of 5 seconds is not adequate In that case uset applications can
85. dress space of the StreamStor controller into the application memory space This address can sometimes be used with software provided by PCI card vendors in place of the address of a memory buffer Check with Conduant about your specific environment for more details In addition writing to this address space from an application is an effective method to save application specific directory or indexing information about the recording It is the responsibility of the user application to manage this type of data Multi Card Operation Multiple StreamStor cards can be used in a single system either on the same bus or on bridged PCI buses If multiple StreamStor cards are installed into the same bus there will be contention for ownership of the bus during data transfers and the effective bandwidth will be reduced If multiple StreamStor cards are installed on opposite sides of a PCI PCI bridge than there is no loss in bandwidth as long as the data capture card is co located on the same bus as the StreamStor card it is streaming data to Software applications gain exclusive access to a StreamStor card after calling the XLROpen function Until the application exits or calls XLRClose no other application may connect to that StreamStor card A single application can connect to and control multiple StreamStor cards but must manage the unique handles returned from multiple calls to the XLROpen function The index number passed into XLROpen determin
86. drives Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e Bus is the ATA bus number of the drive e MasterSlave is XLR_MASTI ER_DRI VI master or slave drive on the ATA bus T E 0 or XLR_SLAVE_DRIVE 1 to select the e temp is a pointer to an unsigned integer to be filled by this function call Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice PUINT temp XLR_RETURN_CODE xlrReturn xlrReturn XLROpen 1 amp xlrDevice if xlrReturn XLR_SUCCESS return 1 xlrReturn XLRGetDriveTemp xlrDevice if xlrReturn XLR_SUCCESS return 1 printf Drive temperatur i 0 BI XLR_MASTER_DRIVE amp temp on Bus 0 Master is d degrees C n temp 56 CHAPTER 2 FUNCTION REFERENCE XLRGetErrorMessage Syntax XLR_RETURN_CODE XLRGetErrorMessage char string XLR_ERROR_COD err T CI Description XLRGetErrorMessage returns the error message of the most recent API failure Parametets e string isa pointer to a string to accept the error message of at least XLR_ERROR_LENGTH size e err isan error code returned from XLRGetLastErrot Return Value On success this function returns XLR_SUCCESS On failure this function return
87. e XLRSetBankMode and XLRSelectBank 95 CHAPTER 2 FUNCTION REFERENCE XLRReadData Syntax T T XLR_RETURN_CODE XLRReadData SSHANDLE xlrDevice PULONG Buffer ULONG AddrHigh ULONG AddrLow ULONG XferLength Description XLRReadData reads data from the StreamStor device This function is identical to XLRRead without the structure to pass request parameters The address of the requested data must be an eight byte aligned value If the StreamStor is in bank mode this command will read data from the currently selected bank Parameters e xl rDevice is the device handle returned from a previous call to XLROpen e Buffer is the address of the user memory buffer to hold the requested data e AddrHigh is the upper 32 bits of a 64 bit byte address of the requested data e AddrLow is the lower 32 bits of a 64 bit byte address of the requested data e xXferLength is the number of bytes requested Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode ULONG myBuffer 40000 xlrReturnCode XLROpen 1 amp xlrDevice AddrHigh and AddrLow must represent an appropriately aligned address xlrReturnCode XLRReadData xlrDevice myBuffer 0 OxFE120000 sizeof myBuffer See Also XLRRead XLRSetMode XLRSetDBMode XLRSe
88. e if recording begins on Bank A fills Bank A and switches to Bank B StreamStor will not switch back to Bank A unless Bank A has been replaced If Bank A has been replaced with a new bank StreamStor will switch back to Bank A when Bank B is full If Bank A has not been replaced the recording will end because there is no free space left Unless the write protect option is set each call to XLRRecord will prepare each bank present in the system for recording If the banks have been recorded on before they will be overwritten In other words StreamStor losses its ability to track which banks have been used i e written between calls to XLRRecord If data written to the bank should not be overwritten the write protect option should be set on that bank CHAPTER 2 FUNCTION REFERENCE Playback Auto bank switching is not available in playback mode Any recordings made with auto bank switching will be considered separate recordings for playback In other words from a playback perspective offset and length each bank begins at an offset of 0 For example if both banks have been recorded on such that an autoswitch occurred to Bank B when Bank A filled up each bank s recording will start at an offset of 0 To start playback at the beginning of Bank A select Bank A with a call to XLRSelectBank and then begin playback at an offset of 0 To start playback at the beginning of Bank B select Bank B with a call to XLRSelectBank and the
89. e moreWork DO OTHER WORK HER nCode XLR XL readRetur if reads PRO else if break tatus CESS readStatus E ERROR zi xlrDevice ReadStatus R_ READ ERROR XLR_R BAD COMPLETE FALSE amp readDesc 104 CHAPTE See Also XLRRead I R 2 FUNCTI ON REFERENCE BankMode and XLRSelect Immed XLRSet 105 Bank CHAPTER 2 FUNCTION REFERENCE XLRReadToPhy Syntax T XLR_RETURN_CODE XLRReadToPhy SSHANDLE xlrDevice PS_READDESC pReadDesc Description XLRReadToPhy reads data from the StreamStor device and writes directly to a supplied physical hardware address This function is intended only for moving data between StreamStor and another device on the bus The buffer address supplied MUST be a physical address and the entire transfer size must be available The supplied address and length will be used to directly program the StreamStor DMA to transfer the data Specifying incorrect addresses to this function can cause system crashes and instability The address of the requested data must be an eight byte aligned value Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e pReadDesc is a pointer to an S_READDESC structure that holds the read address length and physical address for the read data Retur
90. e SDK provides a read function for retrieving data from the recorder The user application must supply a memory buffer sufficient to hold the data requested Note that the StreamStor system will have optimum read performance when reading is performed sequentially from the device 167 CHAPTER 4 OPERATION Read Setup The StreamStor device must be previously opened with XLROpen before reading data or performing other operations If the recording was done with wrapping enabled old data may be overwritten use the XLRGet Length command to get an accurate count of the bytes recorded This number can then be used for indexing into the data Read Positioning A structure is used to set the read pointer with a byte offset count A high and low value is used to overcome the 32 bit limitations of some programming environments Reading Data An XLRRead command is used to request a data transfer from StreamStor to system memoty 168 Chapter 5 External Port CHAPTER 5 EXTERNAL PORT External Port Some models of StreamStor include additional connectors and electronics to provide an alternate method of transferring data into and out of StreamStor These additional paths offer several advantages including freedom from interaction with other devices on an arbitrated bus such as PCI the reduction or elimination of bus FIFOs that may otherwise be required to interface with an arbitrated bus full isolation of data path from ope
91. e a portion of the available space is reserved to manage the partition overhead You must create the first partition on an empty StreamStor device That is if the StreamStor has data on it that was created when the system was not partitioned the data must first be erased Then you can create partitions Once a device is partitioned you can create new partitions on it at any time Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e length is the size in bytes of the partition to create Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_PARTITIONINFO pinfo if XLROpen 1 amp xlrDevice XLR_SUCCESS printf Error Open failed u n XLRGetLastError exit 1 84 CHAPTER 2 FUNCTION REFERENCE By default the StreamStor device is not partitioned To determine if the device is partitioned call XLRGetPartitionInfo if XLRGetPartitionInfo xlrDevice amp pInfo XLR_SUCCESS printf Error Cannot get partitioning information u n XLRGetLastError exit 1 if piInfo Partitioned TRUE printf This StreamStor device is partitioned n Since the device is already partitioned we can create new partitions now we don t have to erase pr xisting data else printf
92. e befor xiting XLRClose xlrDevice See Also XLRClearWriteProtect XLRGetBankStatus XLRSet BankMode and XLRSelectBank 139 CHAPTER 2 FUNCTION REFERENCE XLRStop Syntax XLR_RETURN_CODE XLRStop SSHANDLE xlrDevice Description XLRStop will halt a recording operation and make sure all data is flushed to disk This function should always be used to end a recording XLRStop can also be used to halt a playback initiated by XLRPlayback If the StreamStor is in multi channel mode calling XLRStop stops all recording or playback on all channels Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrReturnCode 7 ll x xlrReturnCode LROpen 1 amp xlrDevice ll x xlrReturnCode LRStop xlrDevice See Also XLRRecord XLRAppend XLRPlayback and XLRSetMode 140 CHAPTER 2 FUNCTION REFERENCE XLRTruncate Syntax T XLR_RETURN_CODE XLRTruncate SSHANDLE xlrDevice ULONG AddrHigh ULONG AddrLow Description XLRTruncate will truncate an existing recording at the address provided The address must fall within the bounds of the currently recorded data set The truncation address must be an eight byte aligned va
93. e handle returned from a previous call to XLROpen 2 startHigh is the upper 32 bits of the 64 bit value that identifies the start position for the playback 3 startLow is the lower 32 bites of the 64 bit value that identifies the start position for the playback 4 lengthHigh is the upper 32 bits of the 64 bit value that identifies the playback length 5 lengthLow is the lower 32 bits of the 64 bit value that identifies the playback length The playback length must be an eight byte aligned value Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 91 Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrStatus 7 XLROpen 1 amp xlrDevice Set up channel for playback Start playing data beginning at offset 0 Then after all data has been played automatically loop back to offset 0 and continue playback xlrStatus XLRPlaybackLoop xlrDevice 0 0 See Also XLRPlayback and XLRSetPlaybackLength CHAPTER 2 FUNCTION REFERENCE XLRPlayTrigger Syntax T XLR_RETURN_CODE XLRPlayTrigger SSHANDLE xlrDevice Description XLRPlayTrigger starts read data flowing When XLRPlayback is called preparations are made internally on the StreamStor to begin playback When preparations are complete the data begins to flow So there is a delay between the call to XLRPlayback and the flow of data To minimi
94. e using partitions the bank mode SS_BANK_AUTO_ON_FULL is not allowed The only way to begin operations on a different bank is to explicitly select the bank to be used Recording using Partitions If a StreamStor has any partitions on it subsequent operations on the StreamStor will be partition specific The following example illustrates this Assume you had previously created several partitions and that partition three had been created as one megabyte long If you then select partition three with XLRPartitionSelect and then begin a recording with wrap mode disabled that data will be recorded only in partition three When one megabyte has been recorded that partition is full and recording will cease To begin recording on partition number four you must call XLRPartitionSelect to select it Using the same partitioning described above if recording was started with wrap mode enabled then once partition three had been recorded to its capacity the recording would wrap around and start recording over the previously written data in partition three In a similar fashion to play back recorded data you must first select the partition to be played Removing Partitioning Once a system has been partitioned it remains partitioned until the system is erased using the XLRErase function with the SS_OVERWRITE_PARTITION option set XLRErase will erase all data partitions user directories and labels If in bank mode the erasure will be
95. ectories to zero such that the drives are reported as having no data However all data is still on the drives XLRI when this command is complete Erase will return gt SS_OVERWRITE_RANDOM_PATTERN overwrites all data on the drives with a random pattern so that the data is permanently deleted XLREras immediately but the erasure can take several hours use XLRGetDeviceStatus see below to find out when erasure is complete e returns gt SS_OVERWRITE_RW_PATTERN is similar to SS_OVERWRITE_RANDOM_PATTERN except that data is read first and then overwritten with a random pattern This mode can be used to verify that all sectors can be read and written Note that this mode will take on average twice as long as the SS_OVERWRIT E RANDOM_PATT ERN mode to complete XLRErase returns immediately but the erasure can take several hours use XLRGetDeviceStatus see below to find out when erasure is complete gt SS_OVERWRITE_DIRECTORY destroys the directory locator block for the currently selected partition if the system is partitioned This option will erase all data including the user directory and labels Other partitions if partitioned are unaffected XI RErase will return when this command is complete gt SS_OVERWRITE_PARTITION destroys everything all partitions data u
96. el Volume 1 19 April 2004 xlrStatus XLRSetLabel xlrDevice Volume 1 label strlen label xlrStatus XLRGetLabel xlrDevice label printf This disk set is labeled s n label Null out the label xlrStatus XLRSetLabel xlrDevice W 0 Close device befor xiting XLRClose xlrDevice See Also XLRGetLabel XLRErase XLRSetBankMode and XLRSelectBank 126 CHAPTER 2 FUNCTION REFERENCE XLRSetMode Syntax XLR_RETURN_CODE XLRSetMode SSHANDLE xlrDevice SSMODE Mode Description XLRSetMode is used to set the input output path and functionality of StreamStor Please refer to the hardware manual for your StreamStor controller or daughterboard for the list of modes it supports Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e Mode is a constant that defines the mode of StreamStor operation Possible mode values are gt SS MODE SINGLE CHANNEL This is the default mode that receives and sends data over one channel i e the PCI bus or one of the external ports gt SS_MODE_FORK This mode allows data to be recorded and simultaneously output For example data can be coming in over one of the external ports recorded and sent out the other external port gt SS_MODE_PASSTHRU This mode is identical to SS_MODE_FORK except that the data is not recorded data m
97. emory space for writing data to be recorded The default size of this window is 8MB although you should use the XLRGetBaseRange to verify this in your application The StreamStor SDK provides two functions that return the physical and logical addresses of this window The address returned by XLRGetBaseAddr is the physical address that is assigned to the StreamStor data window during the boot process The StreamStor PCI interface chip will respond to any memory writes on the PCI bus in this address range Note however that the StreamStor system does not utilize the address to determine where to store the data Any data writes are recorded to disk in the order they are received This physical address can be used directly for programming DMA hardware on the PCI data source device Various techniques can be used for programming the DMA hardware but generally you will need to set up a DMA block transfer that continuously recycles back to the original starting address If the DMA hardware supports chaining scatter gather then a looping transfer can be set up Consult the documentation for your PCI data acquisition card for more information 162 CHAPTER 3 PCI INTEGRATION amp CAUTION The physical address returned by XLRGetBaseAddr cannot be used in place of a buffer memory address Use XLRGet WindowAddr instead The address returned by XLRGetWindowAddr is a logical address created by the operating system to map the physical ad
98. erely passes in one port and out the other gt SS_MODE_MULTI_CHANNEL This mode allows StreamStor to record data from multiple input channels simultaneously For example data can be coming in from the external port and the PCI bus at the same time Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Note CHANGING MODES CLEARS ALL INPUT AND OUTPUT CHANNELS CHANNELS MUST BE BOUND AFTER THE MODE IS SELECTED Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice Set StreamStor to use the external port xlrReturnCode XLRSetMode xlrDevice SS_MODE_ SINGLE CHANNEL j See Also XLRSetDBMode XLRBindInputChannel and XLRBindOutputChannel 127 CHAPTER 2 FUNCTION REFERENCE XLRSetOption Syntax XLR_RETURN_CODE XLRSetOption SSHANDLE xlrDevice UINT options_to_set Description XLRSetOption sets one or more options To set an option the drives must be idle i e no recording or playback in progress Please refer to the hardware manual for your StreamStor controller or daughterboard for the list of options it supports The options are gt SS_OPT_FSMAPPED When set the StreamStor is enabled to read while recording Note that you cannot read while recording if you are recording in wrap mode By defau
99. es which card is to be controlled by the handle returned If multiple applications or multiple instances of the same application are used to control StreamStor cards they must each connect to a unique StreamStor card The XLRDeviceFind function returns the number of StreamStor devices found in the system The index number cannot be larger than this number In most cases the higher value index indicates a card that is on a bus or slot further from the main bus The PCI bus number and slot number are available from the XLRGetDeviceInfo command The command can be used to identify the appropriate card in a multi card system 163 Chapter 4 Operation CHAPTER 4 OPERATION Operation The operation of StreamStor for recording data is very similar to the familiar interface of a tape recorder The XLRRecord function puts the recorder into record mode and the XLRStop function ends the recording Data reading is more like a traditional computer storage device since the data can be retrieved randomly The StreamStor recorder also has a special wrap mode to allow continuous recording past the capacity limits of the disks by overwriting the oldest data Data Recording After getting the base address of the data window using XLRGetBaseAddr it is used to setup the DMA hardware on the data acquisition card for direct slave writing to the StreamStor controller Because the capacity available on StreamStor is much larger than the 32 bit PCI
100. eset the card XLRCardReset 1 118 CHAPTER 2 FUNCTION REFERENCE XLRSetBankMode Syntax XLR_RETURN_CODE XLRSetBankMode SSHANDLE xlrDevice S_BANKMODE mode Description XLRSetBankMode sets the banking mode for the StreamStor By default the StreamStor device is not in bank mode ie a call to XLROpen will set the bank mode to SS_BANKMODE_DISABLED Exceptions to this are the StreamStor PCI 816V100 and PCI 816VXF2 boards which XLROpen automatically places in bank mode The StreamStor remains in the selected mode until a call to XLRSet BankMode is made to change the mode Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e mode is the constant that defines the banking mode for the StreamStor gt SS_BANKMODE_NORMAL puts the StreamStor into normal bank mode If BANK_A is ready it is selected as the current bank If BANK_A is not ready then if BANK_B is ready it is selected as the current bank gt SS_BANKMODE_DISABLED disables bank mode gt SS_BANKMODE_AUTO_ON_FULL automatically switches between banks when one fills up during a recording Autoswitch Notes Recording When using SS_BANKMODE_AUTO_ON_FULL StreamStor will switch to the other bank when the current bank becomes full This transition requires that the bank being switched to is ready and has not been previously recorded on For exampl
101. essdeessesesvaniosetesssasoiennseandesetesednocietedeaniedotsseadsavseadvesbedetesadeosdebesganieds 66 MERG CHM Ode aa nasi EME NE NA AANA TH NOs Rods alist lost EEE ee ide 67 KUERGetO ptiOn ss scsspssssssnsnvedeasseaniovessseasasiesssssnsoveiessaeietesssesnioseiessaevsietsdesniodedesvacvedeissesndedetebedsssiotedestoedebessanve s 68 XRG et Partito rl bo ovis esses cesses dass E asa ae T Sees Baad oat ea ads hwo eee 69 XILRGetPlay Butters tatus araara e E E RRR E OS 70 XLRGetPlay Length inrsinihinenininianeiiaeiinraiian iiri iNES EESE iian 72 MERGetSamplesccssccsccseievstersdsasissetssvanssvansovarievensasansovansovarvesansnvarssvansovansovensosanvovans varvesansavarsssansovorvesenvannabesansees 73 ALEL VA a l E EEE E E EAE E E AS 74 DIR Get Set Ditanam a RR R ER ee RAR E e eo RE ERR s 75 XIRGetUserDir Length neiise i iea ai itai eair si iiia 77 XERG EV CIS1 O a aana a a a A a AN 78 KERG CteWind Ow A dd tireisce csd cssihdesciaseusteanioeechvaieeedapivra vrieaetovnaeted aadevedvas ines ioaaivsias E E E E S 79 B40 BY SNS Foy bi ciel Banken aaa AA O EAEE E E 80 XERNetOpen Windows OND sesine e a e Ae a A A a a E RS 81 MRO EN vesisssscssesssecsetovanssvansstetiosesssvanscsanionacuasnsssanssvanspvatbasenssdansvanvenatbassnssaanssvansvotbasonsadansovantesanbasensaaansdbansaas 83 D A Da ee TINIE TOILE E S iE S aeeeen cent E AAS E A 84 KERPU OASE ECO fc cesecess cecevcducotuvcanestexetssxeuceaotsuaetentaxestsntiesetecevesevartiasgesntecieensSeestantbeaseeeeevu
102. et play length is reached Then playback ceases on the selected bank Your application may then select the other bank to continue playback Playback continues on that bank until all data has been played Playback can continue in this fashion with data retrieval alternating between the two banks until all data is played a play length is reached or XLRSt op is called Drive Modules By default drives modules are not labeled You can use the XLRSet Label function to label idle drive modules with a null terminated string When in non bank mode the label applies to the entire collection of drives that are mounted When in bank mode the label applies only to the drive module in the selected bank For example to label the drives in both banks you would 1 Call XLRSelectBank with bankID set to BANK_A 2 Call XLRSet Label with the desired label for Bank A 3 Call XLRSelectBank with bankID set to BANK_B 4 Call XLRSetLabel with the desired label for Bank B The label can be up to XLR_DRIVEMODULE_LABEL_LENGTH bytes long Because the label is a NULL terminated string you can remove a label from a drive module by calling XLRSet Label with the desired label set to a null string You can call XLRSet Label on an idle StreamStor to add or modify a label any time after a drive module has been selected Labels need not be unique i e the drive module in Bank A and the drive module i
103. f the recording data window This address can be used from device drivers or other kernel level software The address returned from this function is NOT a valid user address Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value This function returns the physical PCI address as a 32 bit unsigned integer Usage ULONG xlrAddress SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice if xlrStatus XLR_SUCCESS Error opening StreamStor else xlrAddress XLRGetSystemAddr xlrDevice 74 CHAPTER 2 FUNCTION REFERENCE XLRGetUserDir Syntax XLR_RETURN_CODE xferLength UINT offset PVOID udirPtr Tj pS LRGetUserDir SSHANDLE xlrDevice UINT Description XLRGetUserDir returns the user directory on the StreamStor recorder where the user directory was previously set with the XLRSetUserDir command If the StreamStor is in bank mode this command will return the user directory of the currently selected bank If the StreamStor is partitioned this command will return the user directory of the currently selected partition Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e xferLength is the length of the user directory The maximum size of a user directory is XLR_MAX_UDIR_LENGTH e offset is the begin
104. failed u n XLRGetLastError exit 1 if XLRGetPartitionInfo xlrDevice amp partitionInfo XLR_SUCCESS printf ERROR GetPartitionInfo failed u n XLRGetLastError exit 1 printf Number of partitions u n partitionInfo NumPartitions See Also XLRPartitionCreate and XLRPartitionSelect 69 CHAPTER 2 XLRGetPlayBufferStatus FUNCTION REFERENCE Syntax XLR_RI ETURN_COD I status Description buffer i XLRSe Parameters E XLRGetPlayl BufferStatus SSHANDLI E xlrDevice e xlrDevice is the device handle returned from a previous call to XLROpen e status isa pointer to a UI is one of gt SS_PBS_ IDLE The pl ayback buffer is not in use PUT NT XLRGetPlayBufferStatus retrieves the status of the playback buffer The playback s used when the playback trigger is armed See the SS_OPT_PLAYARM option of the tOption command NT that will receive the playback buffer status where status gt SS_PBS_FULL The playback buffer is full and a playback is not in progress gt SS PBS FILLING Data is streaming into the playback buffer gt SS_PBS_PLAYING Data from the playback buffer is playing gt SS PBS UNKNOWN The status of the playback buffer cannot be determined Return Value On success this function returns XLR_SUCCESS On failure thi
105. g mode is set by calling XLRSetMode The hardware manual for your StreamStor controller or daughterboard describes the operating modes that are available for your board type The default operating mode is SS_MODE_SINGLE_CHANNEL single channel mode Selecting and Binding Channels The XLRSelectChannel function is used to select a channel that future functions will act on One example is XLRSelectChannel needs to be called to select the FPDP channel before a call to XLRSetDBMode is made XLRSelectChannel should always be called to select a channel before calling XLRBindInputChannel or XLRBindOutputChannel XLRClearChannels should be called once before setting up the channels to clear the default channels or to clear the previous setting of channels Since XLRClearChannels clears the previous settings of channels when setting up multiple channels XLRClearChannels should be called just once before the setting up of the channels If you do not want to use the default channels then you must identify which channels you want to use The process of identifying a channel is called binding a channel Binding a channel is analogous to choosing the data path The function XLRBindInputChannel is used to bind a channel for input into StreamStor and the function XLRBindOutputChannel is used to bind a channel for output from StreamStor These functions should be called before data is transferred to or from the StreamStor
106. has not been detected on the bank Otherwise it is set to the error code e ErrorData IfErrorCode is non zero ErrorData holds any additional data about the error e TotalCapacity The bank s capacity in system pages 147 CHAPTER 2 FUNCTION REFERENCE Structure S DBINFO typedef struct _DBINFO UINT SerialNum har PCBVersion XLR_VERSION_LENGTH har PCBType XLR_MAX_NAME har PCBSubType XLR_MAX_NAME har FPGAConfig XLR_MAX_NAME har FPGAConfigVersion XLR_VERSION_LENGTH INT NumChannels INT Param 8 S_DBINFO PS_DBINFO qaaqaqagaagqaa Purpose This structure is used by the XLRGetDBInfo function to return information about the daughterboard Members e SerialNum the daughterboard serial number e PCBVersion the daughterboard version e PCBType the daughterboard type e PCBSubType the daughterboard subtype e FPGAConfig the function type of the code loaded in the FPGA on the daughterboard e FPGAConfigVersion the version of the code loaded in the FPGA on the daughterboard e NumChannels the number of channels on the daughterboard e Param Reserved for future use 148 CHAPTER 2 FUNCTION REFERENCE Structure S DEVINFO typedef struct _DEVINFO char BoardType XLR_MAX_NAME UINT SerialNum UINT NumDrives UINT NumBuses UINT TotalCapacity UINT MaxBandwidth
107. he device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus Open the device xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRClearChannels xlrDevice Close device befor xiting XLRClose xlrDevice See Also XLRBindInputChannel XLRBindOutputChannel and XLRSelectChannel 32 CHAPTER 2 FUNCTION REFERENCE XLRClearOption Syntax XLR_RETURN_CODE XLRClearOption SSHANDLE xlrDevice UINT options_to_clear T Description XLRClearOption clears an option previously set by XLRSetOption or clears all options When an option is cleared it is set to its default value See XLRSet Option for the list of available options and default values To clear an option the drives must be idle i e no recording or playback in progress Parameters e xl1rDevice is the device handle returned from a previous call to XLROpen e options_to_clear isa vector of options to clear Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODI lrStatus za X This example shows how to set options to their default values and how to set and clear a specific option
108. he user directory or label it will only attempt to recover the main data area The last partial block of data may be truncated upon recovery so you may lose up to 64K bytes of data Note that in some cases no recovery or only partial recovery of data is possible It is the uset s responsibility to verify the integrity of any recovered data and if necessary truncate any corrupted data from the recording Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e Mode is the type of recovery that is to be performed gt Return If a recording has ended without calling XLRStop as might happen if the StreamStor s power fails StreamStor s directory may be corrupted To recover data in this case set Mode to SS_RECOVER_POWERFAIL If a recording has been partially overwritten the data that has not been overwritten may be recoverable To recover data in this case set Mode to SS_RECOVER_OVERWRITE If a recording has been accidentally erased but not overwritten the data may still be recoverable To recover data in this case set Mode to SS_RECOVER_UNERASE Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 109 Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode 7 xlrReturnCode XLROpen 1 amp xlrDevice Attempt to repair StreamStor direc
109. ine where to create the partition Once a device has been partitioned in order to perform operations on the partitions you must first select the partition using the partition number that was assigned to it when it was created Selecting a Partition The API function XLRPartitionSelect is used to select the partition that is to be used for subsequent StreamStor partition specific operations To select a partition call XLRPartitionSelect specifying the partition number that was assigned to it when it was created 192 CHAPTER 8 DRIVE PARTITIONING Some examples of partition specific operations are e XLRRecord records only on the selected partition e XLRSetWriteProtect applies write protection only to the selected partition e XLRErase with any option other than the option to destroy all partitions erases the data only in the selected partition e XLRGetDirectory returns information that pertains only to the selected partition For instance the Full structure member of S_DIR will be set to TRUE if the selected partition is full e XLRSetLabel applies the requested label only to the selected partition If a partition has not been selected by calling XLRPartitionSelect then partition 0 zero will be selected by default See the section Bank Mode and Partitioning in this chapter for details on how the selected bank works in conjunction with the selected partition Getting Partition Information
110. information about the StreamStor bank status of the specified bank Members e Label String holding the bank label e Length Length of the bank s recording in bytes e State A bank can be in any of 3 states STATE_READY STATE_NOT_READY and STATE_TRANSITION If the state is STATE_READY the bank is ready for use Otherwise it is not ready or it is transitioning to or from a ready or not ready state T e Selected If TRUE the specified bank is the currently selected bank e PowerRequested If TRUE a power up request has been received for the bank Otherwise a request has not been received e PowerEnabled If TRUE the bank has power Otherwise it does not e MediaStatus There are four possible values gt MEDIASTATUS_EMPTY indicates that the bank has no data recorded on it gt MEDIASTATUS_NOT_EMPTY indicates that the bank has some data recorded on it but it is not full gt MEDIASTATUS_FULL indicates that the bank is full gt MEDIASTATUS_FAULTED indicates that there is data on the bank but for some reason the directory structure is corrupted The bank must be erased before it can be used e WriteProtected If TRUE the bank is write protected Otherwise the bank is not wtite protected 146 CHAPTER 2 FUNCTION REFERENCE e ErrorCode If0 zero an error
111. inter to the buffer containing the user directory The buffer can contain any type of data string binary etc The maximum size of the user directory is XLR_MAX_UDIR_LENGTH e udirSize is the size in bytes of the buffer pointed to by udirPtr If udirSize is zero then udirPtr is ignored and any existing user directory will have its length set to zero The user directory must be 8 byte aligned i e its udirSize must be a multiple of 8 Note This command can be very slow over the remote interface Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus char userDirBuff 4800 UINT dirLength Open the devic xlrStatus XLROpen 1 amp xlrDevice strcpy userDirBuff 1234567 Add 1 to length for the NULL terminating character dirLength strlen userDirBuff 1 xlrStatus XLRSetUserDir xlrDevice userDirBuff dirLength 136 CHAPTER 2 FUNCTION REFERENCE See Also BankMode and XLRSelect XLRGetUserDir XLRGetUserDirLength XLRSet 137 Bank CHAPTER 2 FUNCTION REFERENCE XLRSetWriteProtect Syntax T XLR_RETURN_CODE XLRSetWriteProtect SSHANDLE xlrDevice Description XLRSetWriteProtect marks a StreamStor recorder as write protected After write protection is set subsequent attempts to alter the recorded data i e call
112. ions and voltages Does the confidence test ssofg exe on Windows or ssopen sstest on Linux run OK Has the software installation been corrupted Try re installing software Have you checked the Conduant web site for technical bulletins Have you recently installed a new Linux kernel or compiler or a new Windows Service Pack If the above steps did not resolve the problem then please call Technical Support or open a support ticket To open a support ticket go to www conduant com click on Support and then click on Submit a ticket Please provide the following information e StreamStor Card Serial Number e Software Revision s e Configuration 816XF 816XF2 disk drive model numbers etc 206 CHAPTER 10 TECHNICAL SUPPORT e Description of third party equipment that StreamStor is working with i e Manufacturer and model numbers etc e Description of third party software being used with StreamStor e Computer model and type Pentium Pentium II etc e Operating system version We will do all that we can to resolve the problem as quickly as possible Contacting Technical Support E mail support conduant com Phone 303 485 2721 Fax 303 485 5104 Web www conduant com Mail Conduant Corporation Technical Support 1501 South Sunset Street Suite C Longmont CO 80501 207 Appendix A Error Codes If you are experiencing one of these errors and are unable to determine the cause please contact C
113. ivesieeeions a n RR ARO TO RRR sates lenin TORR 119 XIRS DBM Od Ernie e a A AOE EOE ERR ERRER EREE E E A EAE 121 XERS tDriveStandbyMode sristi iieii aiaa iinis iiini esini 123 MEERS thea bel cocks vieonsistiein RE EETA OEE ERRORE EE O RNR E TEENE 125 XERSeM oder A A AA ARA ACA A R Ha N A PEE 127 X RSO PION a aee AE A aa a E E a a E aE E a Ea EAE SEEE EEE EE 128 XLRSetPlaybackLength sisiiisisineneicinandarinienniiasnianii an ia iait 130 KERSet POrtGlo ce denin a a ae Sa AAEE EEE RERNE NE tes 132 PUR Set Read Lasintt ssh scicvskscshcasbssahovevecvssctesceceseseestecessestecvseascucvceeesuceiveastiias tae seek oe Saa A a ENEN iS 133 MI RSet SaiipleM Od ere iyara E R TRARRE R GR 134 XERS tUserDieasareecenaranana taa a aa aa aa ann a n ka 136 PAPS ANA ME E A E E EE ES EEEE EEEE 138 DaS EEE EREE EEEE 140 DAE Bi us ol or hn EAEE Reinet eaten E ee eee A E AE EE 141 DOP RW f1 GE ennenen ne cl eta ta hese Ses NR NNNNA N A 143 KIRWA ress seesssxecevasscescouvsveccsesesvesacesscvetecativectewtevsesacesiandevevasisuastcusteessaness ste vtestsvaatestucinattaneuiateaeeieotes 145 Stricture S BANKSTAT US ete chon tins valet artds voit nvid neta dia indies a 146 Structure S DBINFEO assess oE aa E EIRE A A beats degen hae Doigea tea eeu eet 148 Structure SUDE VINO raae ENEE EAA EAAS 149 Sthuctute SO DENMSTA TUS aani RE E EE E E ET TE EA EEEE 150 ULI GTUIRE SN Re se sit EE EEE E AEA EAA AE EAA TAE 152 Structure S DRIVEIN O aeiia A A GARRATS 153 Structute S EVENTS
114. lectChannel Syntax T XLR_RETURN_CODE XLRSelectChannel SSHANDLE xlrDevice UINT channel Description XLRSelectChannel selects the channel that future commands will operate on A channel can be selected and operated on regardless of whether or not it s bound Please refer to the hardware manual for your StreamStor controller or daughterboard for the list of channels it supports Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e channel is the number of the channel to select Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSelectChannel xlrDevice 30 xlrStatus XLRSetDBMode xlrDevice SS_FPDP_RECVMASTER 0 See Also XLRClearChannels XLRBindInputChannel and XLRSetDBMode 116 CHAPTER 2 FUNCTION REFERENCE XLRSelfTest Syntax XLR_RETURN_CODE XLRSelfTest SSHANDLE xlrDevice SS_SELFTEST test Description XLRSelfTest performs an internal self test on the StreamStor device After self testing has completed you should reset the StreamStor card Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e test is a constant specifying what kind of test
115. lization error code if SysError is TRUE e Booting For Conduant internal use only e FifoFull Indicates the system is at capacity while in FIFO mode e Overflow Indicates the disk drives reached capacity during a record operation When in mode SS_MODE_FORK or SS_MODE_PASSTHRU see XLRSetMode Overflow gets set when the external port data has overflowed the available FIFO space 151 CHAPTER 2 FUNCTION REFERENCE Structure S DIR typedef struct _DIR DWORDLONG Length DWORDLONG AppendLength BOOLEAN Full BOOLEAN WriteProtected S_DIR PS_DIR Purpose This structure holds the directory information for the current recording The structure is filled with a call to XLRGetDirectory Use XLRGetLengthPages for environments that can t support 64 bit integers DWORDLONG Members e Length The length of the current recording in bytes Note that this parameter is a 64 bit number e AppendLength The length of the last set of data recorded using XLRAppend Note that this parameter is a 64 bit number e Full This flag will be TRUE non zero when the system has been filled to capacity e WriteProtected If not in bank mode this flag will be TRUE non zero if the system is write protected If the system is in bank mode this flag will be TRUE if the currently selected bank is write protected 152 CHAPTER 2 FUNCTION REFERENCE Structure S DRIVEINFO typedef stru
116. lt this option is not set gt SS_OPT_PLAYARM When set the StreamStor is armed for a two stage playback You set this option and then call XLRP layback Data will be buffered up for playback but no data will play until triggered See XLRPlayTrigger By default this option is not set When XLROpen is called all options are set to their default value Parameters e xl1rDevice is the device handle returned from a previous call to XLROpen e options_to_set is a vector containing one or more of the above options Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice Set the desired option xlrStatus XLRSetOption xlrDevice SS_OPT_PLAYARM Z record some data XLRStop xlrDevice Clear the option xlrStatus XLRClearOption xlrDevice SS_OPT_PLAYARM 128 CHAPTER 2 FUNCTION REFERENCE See Also XLRClearOption XLRGetOption and XLRPlayTrigger 129 CHAPTER 2 FUNCTION REFERENCE XLRSetPlaybackLength Syntax XLR_RETURN_CODE XLRSetPlaybackLength SSHANDLE xlrDevice ULONG lenHigh ULONG lenLow Description XLRSetPlaybackLength is used to stop playback after a specified number of bytes have been played When a playback length is set playback continues until the number of specified bytes has been played XLRSt
117. ltiple Files option to automatically create system files of sequential and equal size data blocks from StreamStor The directory field allows you to choose an alternate system directory current directory will be used by default The prefix and extension fields are used to define the common text for the filenames The Start End and Digits define a number used to form unique filenames The Start with the number of digits defined by Digits is appended to the prefix and the extension is appended after that with a period to form the filename The Filenames area will show a preview of the file names to be used The amount of data specified by File size is written to this file and the process is repeated with the number incrementing until End is reached The Byte Address for each retrieval is incremented by the file size amount so that sequential data is retrieved This mode is useful for retrieving blocks of data into independent files when the size of the block is fixed such as when digital images have been recorded In both modes the Byte address field is automatically incremented after each fetch by the amount of data transferred 17 CHAPTER 1 INTRODUCTION Windows Library The software development kit includes a DLL library for integration of StreamStor into Windows based user applications The required DLL file is xlrapi dll The library file xlrapi lib is also incl
118. lue If the StreamStor is in bank mode this command will truncate data from the currently selected bank If the StreamStor is partitioned this command will truncate data from the currently selected partition Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e AddrHighis the upper 32 bits of the 64 bit truncation address e AddrLow is the lower 32 bits of the 64 bit truncation address Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus ULONG AddrHi ULONG AddrlLo Open the devic xlrStatus XLROpen 1 amp xlrDevice Append data xlrStatus XLRAppend xlrDevice Stop recording XLRStop xlrDevice AddrHi and AddrLo must represent an appropriately aligned address AddrHi 0 AddrLo OxFE120000 Truncate the recording 141 CHAPTER 2 FUNCTION REFERENCE xlrStatus XLRTruncate xlrDevice AddrHi Addr Close device befor xiting XLRClose xlrDevice See Also XLRDeleteAppend XLRSet BankMode and XLRSelect Lo 142 Bank CHAPTER 2 FUNCTION REFERENCE XLRWrite Syntax XLR_RETURN_CODE XLRWrite SSHANDLE xlrDevice PS_READDESC pWriteDesc T Description XLRWrite writes data from a user memory buffer to StreamStor The StreamStor must be in re
119. m rf SHOME windriver rc f Remove the WinDriver shared object file by entering rm usr lib libwdapi lt version gt so where lt version gt is the version number you want to uninstall e g libwdapi801 so For version 7 x of WinDriver erase the file libwd_utils so Linux Configuration Test Utilities Two Linux utility programs are included with the SDK to test the StreamStor system for proper configuration and functionality If you have just received your StreamStor system or if you are experiencing problems running these programs will perform configuration and confidence tests to insure that your system is working properly Linux programs that use the StreamStor SDK such as the utilities below require that the environment variable STREAMSTOR_BIB_PATH be set and exported to the SDK directory containing the StreamStor bib files For example STREAMSTOR_BIB_PATH usr local streamstor linux bib export STREAMSTOR_BIB_PATH The program ssopen simply attempts to open the StreamStor and then closes it To execute it 1 cd lt InstallDir gt linux util 2 ssopen If your system can communicate with the StreamStor board you should see this output Attempting to open StreamStor StreamStor opened successfully Device Status SystemReady gt 1 MonitorReady gt 0 DriveFail gt 0 DriveFailNumber gt 0 SysError gt 0 SysErrorCode gt 0 CtlrError gt 0 19 CHAPTE
120. make calls to XLRGetFIFOLength to ensure there is enough data present before the call XLRReadF IFO FIFO operation Stopping data forking or passthru requires the use of two calls to XLRStop The first XLRStop will shutdown the receiving hardware but leave the sending operation over the PCI bus still running After the first stop call XLRGetFIFOLength to find out exactly how much data is left in the FIFO to read Next call XLRReadFIFO with the amount returned from XLRGetFIFOLength make sure the buffer is big enough to read out the remaining data Note that after XLRStop is called you are only allowed 203 CHAPTER 9 FORKING AND PASSTHRU to call XLRReadFifo once Finally call XLRStop for the final time to take the StreamStor out of record mode For an example of how to use FIFOs please see the example XLRGetFIFOLengthExample c in the SDK example directory Overflows Data forking and passthru operate in a real time fashion If data is coming in faster than it is leaving StreamStor s on board RAM buffer will eventually fill and an overflow condition will arise Overflow conditions are signaled by the Overflow member of the S_DEVSTATUS structure This structure is filled by calls to XLRGetDeviceStatus See the function reference for more information amp CAUTION Once an overflow condition arises the integrity and order of output data can no longer be guaranteed The only way to
121. n Bank B can have the same label To retrieve a label from a drive module select the desired bank and then call XLRGetLabel The buffer you read the label into must be large enough to hold the label and the NULL terminator 187 CHAPTER 7 BANK SWITCHING Writing a User Directory A user directory is a reserved area on a StreamStor recording that can only be written to by calling the function XLRSetUserDir The user directory can be any type of data including binary data The user directory can be up to XLR_MAX_UDIR_LENGTH bytes long When in non bank mode there is only one user directory When in bank mode each drive module can have a user directory Because of firmware limitations the size of the user directory must be a multiple of eight bytes Writing a user directory on a bank is similar to writing a label on a bank You first select the bank by calling XLRSelectBank and then call XLRSetUserDir to write the directory to it Since user directories are variable length and may or may not be NULL terminated you must first get the user directory length before retrieving the user directory For example to get the user directory on Bank B you would 1 Call XLRSelectBank with bankID set to BANK_B 2 Call XLRGetUserDirLength to get the length of the user directory on Bank B 3 Call XLRGetUserDir to retrieve the user directory on Bank B passing it the length that was returned by the call
122. n Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLI xlrDevice S_READDESC readDesc XLR_RETURN_CODE xlrReturnCode GI xlrReturnCode XLROpen 1 amp xlrDevice AddrHi and AddrLo must represent an appropriately aligned address readDesc AddrHi 0 readDesc AddrLo OxFE120000 readDesc XferLength XLRGetBaseRange xlrDevice readDesc BufferAddr myDeviceAddress xlrReturnCode XLRReadToPhy xlrDevice amp readDesc See Also XLRPlayback 106 CHAPTER 2 FUNCTION REFERENCE XLRRecord Syntax XLR_RETURN_CODE XLRRecord SSHANDLE xlrDevice BOOLEAN WrapEnable SHORT ZoneRange Description XLRRecord starts the record mode of the StreamStor device After a successful call of this function the StreamStor device will record to disk any data written to its data window on PCI or to its external data port Recording will continue until the device is full or until XLRStop is called whichever occurs first Note gt If the StreamStor is in bank mode this command will record on the currently selected bank gt If the StreamStor is partitioned this command will record on the currently selected partition gt If the StreamStor is in multi channel mode this command will record on all channels that you have bound for input with XLRBindInputChannel Parameters e
123. n begin playback at an offset of 0 Note that if you are in bank mode and are using partitions the bank mode SS_BANK_AUTO_ON_FULL is not allowed The only way to begin operations on a different bank is to explicitly select the bank to be used Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetBankMode xlrDevice SS_BANKMODE_NORMAL The default bank is Bank A and it is ready so this call will clear write protection on BANK_A xlrStatus XLRClearWriteProtect xlrDevice Turn bank mode off xlrStatus XLRSetBankMode xlrDevice SS _BANKMODE_DISABL ea J See Also XLRGetChassisType and XLRSelectBank 120 CHAPTER 2 FUNCTION REFERENCE XLRSetDBMode Syntax XLR_RETURN_CODE XLRSetDBMode SSHANDLE xlrDevice FPDPMODE Mode FPDPOP option Description XLRSetDBMode is used to set the operating mode of the external port on the Amazon daughterboard if one exists or on the FPDP interface for other StreamStor board types For details on FPDP please refer to the External Port chapter of this manual Please refer to the hardware manual for your StreamStor controller or daughterboard for the list of modes it supports
124. nction StreamStor currently does not drive or act on received PIO signals Contact Conduant for more information on using PIO signals Interface Functions To ready StreamStor to transfer data using FPDP the API routine XLRBindxxxChannel must be called The FPDP port s channel number will depend on the board type For details on channel numbers see the XLRSelectChannel function in the Function Reference section of this manual The bind function is called as follows xxx stands for Input or Output depending on intended usage XLRBindxxxChannel device 0 After StreamStor is in external port mode an API call to XLRSetDBMode is used to configure the port This command allows you to set the mode to one of FPDP Transmit Master FPDP TM FPDP Transmit FPDP T StreamStor unique FPDP Receive FPDP R FPDP Receive Master FPDP RM Vv Vv VV VY FPDP Receive Master Clock Master FPDP RMCM StreamStor unique The hardware manual for your StreamStor controller or daughterboard describes which FPDP modes are available for your board type In FPDP T mode StreamStor drives the FPDP DATA DVALID Data Valid DIR direction and SYNC Sync Pulse signals but uses the FPDP clock that is driven to the FPDP bus by some other source In this mode 172 CHAPTER 5 EXTERNAL PORT StreamStor does not provide any termination for signals other than DATA To use this mode properly StreamStor should
125. ndby mode when they are not in use will reduce the power consumption of the drives This mode also reduces the chance of head to disk contact which greatly decreases the probability of disk damage When drives are placed in standby mode the recovery time when exiting standby mode depends on the disk drive model and other factors This command only affects drives that support standby mode such as 2 5 notebook drives Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e StandbyEnable sets the mode If StandbyEnable is TRUE the drives are put into standby mode Otherwise the drives are taken out of standby mode By default the drives are not in standby mode Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrStatus LT xlrStatus XLROpen 1 amp xlrDevice Tf the enable parameter is TRUE standby mode will be enabled which means drives should spin down xlrStatus XLRSetDriveStandbyMode xlrDevice TRUE Do whatever you need to do while the drives are spun down 123 CHAPTER 2 FUNCTION REFERENCE Now you want to access the drives for a record or playback for example Spin the drives up xlrStatus XLRSetDriveStandbyMode xlrDevice FALSE Sleep 5 seconds giving the drives time to spin u
126. ning offset into the user directory e udirPtr isa pointer to a buffer large enough to hold the expected user directory Note This command can be very slow over the remote interface Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage ULONG xlrAddress SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus char userDirBuff 1024 UINT dirLength xlrStatus XLROpen 1 amp xlrDevice dirLength XLRGetUserDirLength xlrDevice if dirLength Dre ef printf This system does not have a user directory n else xlrStatus XLRGetUserDir xlrDevice dirLength 0 userDirBuff 75 CHAP TER 2 FUNCTION REFERENCE ose device befor A Cl XLRClose xlrDevice See Also XLRSetUserDirectory XLRSelectBank xiting XLRGetUserDirLength 76 XLRSet BankMode and CHAPTER 2 FUNCTION REFERENCE XLRGetUserDirLength Syntax UINT XLRGetUserDirLength SSHANDLE xlrDevice Description XLRGetUserDirLength returns the length in bytes of the user directory on the StreamStor recorder where the user directory was previously set with the XLRSetUserDir command If the StreamStor is in bank mode this command will return the length of the user directory on the currently selected bank If the StreamStor is partitioned this command will return the length of the user
127. nk name specified 146 XLR_ERR_NOTINBANKMODE Command only valid in bank mode 148 XLR_ERR_DRIVEMODULE_ Drive module is not ready 210 APPENDIX A ERROR CODES NOTREADY 153 XLR_ERR_CANNOT_RECOVER No recovery of data possible _DATA 154 XLR_ERR_NO_RECOVERABLE No recoverable data _DATA 155 XLR_ERR_BAD DISKSET A disk is missing from a recording or a disk is mounted that was not part of the set when the recording was originally made 156 XLR_ERR_INVALID_PLAY Playback length is beyond the end _LENGTH of the recording or is not aligned on an eight byte boundary 157 XLR_ERR_INVALID_ Invalid driver license WDLICENSE 158 XLR_ERR_WRITE_ Command invalid on write protected PROTECTED drive modules 159 XLR_ERR_MAX CARDS Maximum number of StreamStor cards exceeded 160 XLR_ERR_DRVFAIL_BUSO_ Master drive on Bus 0 missing or MASTER failing 161 XLR_ERR_DRVFAIL_BUSO_ Slave drive on Bus 0 missing or SLAVE failing 162 XLR_ERR_DRVFA
128. nnel for output from the StreamStor lrStatus XLRBindOutputChannel xlrDevice 0 f xlrStatus XLR_SUCCESS aN return 1 xlrStatus XLRRead xlrDevice amp readDesc if xlrStatus XLR_SUCCESS return 1 29 CHAPTER 2 FUNCTION REFERENCE See Also XLRI Bind XLRClearChannels InputChannel and XLRSelectChannel 30 CHAPTER 2 FUNCTION REFERENCE XLRCardReset Syntax T XLR_RETURN_CODE XLRCardReset UINT index Description XLRCardReset will attempt to reset a StreamStor device and re initialize the hardware and firmware This function should be used only as a last resort Parameters e index is the card index number Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage xlrReturnCode XLRCardReset 1 See Also XLROpen and XLRReset 31 CHAPTER 2 FUNCTION REFERENCE XLRClearChannels Syntax T 25 XLR_RETURN_CODE XLRClearChannels SSHANDLE xlrDevice Description XLRClearChannels unbinds all input and output channels from StreamStor The system cannot be reading or writing and new input and output channels must be bound before any recording or playback operation is started XLRClearChannels must be called before calling XLRBindInputChannel or XLRBindOutputChannel to unbind the channels Parametets e xlrDevice is t
129. ollowing simulates this by reading from StreamStor to memory pBuffer PULONG malloc DMA_size pSSAddr XLRGetWindowAddr xlrDevice for j 0 j lt loops jtt for i 0 i lt DMA size i 4 pBuffert pSSAddr 133 CHAPTER 2 FUNCTION REFERENCE XLRSetSampleMode Syntax XLR_RETURN_CODE XLRSetSampleMode SSHANDLE xlrDevice UINT bufSize S_SAMPLEMODE mode Description XLRSetSampleMode turns sampling mode on off and configures the buffer size of sampling To start sampling call XLRSet SampleMode with bufSize set to the size of the sample and mode set to SS_SAMPLEMODE_NORMAL or SS_SAMPLEMODE_PASSTHRU To end sampling call XLRSetSampleMode with a bufSize set to zero and mode set to SS_SAMPLEMODE_DISABLED Parameters e xl1rDevice is the device handle returned from a previous call to XLROpen e bufSize is the size of the sample in bytes to grab from StreamStor bufSize must be an eight byte aligned value The maximum sample size is 8 megabytes e mode is the constant that defines the sampling mode for the StreamStor gt SS_SAMPLEMODE_NORMAL puts the StreamStor into normal sample mode In this mode you can retrieve samples while data is recorded to the StreamStor drives gt SS_SAMPLEMODE_PASSTHRU puts the StreamStor into passthru sample mode In this mode data is not recorded to the StreamStor
130. om a previous call to XLROpen Return Value Usage SSHANDLE xlrDevice DWORDLONG length 0 Setup StreamStor in a valid fork or pass thru mode Get the length of data in the fifo length XLRGetFIFOLength xlrDevice See Also XLRSetMode XLRReadFIFO and XLRGetLength 61 CHAPTER 2 FUNCTION REFERENCE XLRGetLabel Syntax XLR_RETURN_CODE XLRGetLabel SSHANDLE xlrDevice char label T T Description XLRGetLabel returns the label on the StreamStor recorder where the label was previously set with the XLRSetLabel command If no label has been previously set a default label will be returned If the StreamStor is in bank mode this command will return the label of the currently selected bank Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e label is a pointer to a string to accept a label of at least XLR_LABEL_LENGTH in size Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus char label XLR_LABEL LENGTH xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRSetLabel xlrDevice Label 2 xlrStatus XLRGetLabel xlrDevice label printf This disk set is labeled s n label Null out the label label 0 0 XlrStatus XLR
131. onduant technical support for assistance Number Error Title Description 2 XLR_ERR_NODEVICE StreamStor device was not found in system 3 XLR_ERR_NOINFO Undefined error occurred 4 XLR_ERR_WDOPE Cannot open device driver 5 XLR_ERR_SYSERROR The controller reported a system error 6 XLR_ERR_NOXLR No StreamStor cards located 7 XLR_ERR_INVALID_CMD An invalid command was received by the controller 8 XLR_ERR_HANDLE Invalid handle 9 XLR_ERR_DMAREADFAIL A DMA read failure occurred 10 XLR_ERR_SYSTATUS Request is incompatible with current system status Ta XLR_ERR_NOCMDSTATUS The command did not complete Communication with controller timed out 12 XLR_ERR_DMAINCOMPLETE The data transfer timed out and did not complete T3 XLR_ERR_APPSTART The controller failed to initialize RAM application 14 XLR_ERR_OUTOFMEMORY The DLL failed to allocate sufficient memory 15 XLR_ERR_WIN32FAIL A Win32 API failure occurred 16 XLR_ERR_WRITENOTACTIVE System not ready to receive data 17 XLR_ERR_WDVERSION Incorrect driver version detected 18 XLR_ERR_OPENHAND
132. operate with or without partitions By default the drives are not partitioned When the drives are not partitioned they are operated upon as if they were a single unit If the drives are partitioned StreamStor operations are performed on the currently selected partition Creating a Partition A StreamStor device is classified as not partitioned or partitioned A partitioned system has one or more partitions and an undefined area that has not yet been partitioned The API function XLRPartitionCreate is used to create a partition You pass the function the length of the partition you want to create The length is specified in pages where a page is 4096 bytes The function will attempt to create a partition of approximately the requested size The actual size of the partition that is created is determined by the state of the disks and other internal boundary restrictions The API function XLRGetPartitionInfo will return the actual size of the partition that was created in the PartitionCapacity member of the S_PARTITIONINFO structure When a partition is created it is assigned a partition number Partition numbers start at 0 zero and increment up to 256 If the StreamStor has data recorded on it that was written in a non partitioned mode that data must first be erased before you can create any partitions Note that you cannot create a partition at a specific offset on the StreamStor device Instead the StreamStor will determ
133. orst UCHAR raw 6 UCHAR Reserved S_SMARTVALUES PS_SMARTVALUES Purpose This structure is used by the XLRReadSmartValues function to return SMART values retrieved from SMART capable disk drives Members For information on interpreting the members of this structure please refer to the ATA specifications or to the disk drive vendor s documentation 158 CHAPTER 2 FUNCTION REFERENCE Structure S XLRSWREV typedef struct _XLRSWREV char ApiVersion XLR_VERSION_LENGTH char ApiDateCode XLR_DATECODE_LENGTH char FirmwareVersion XLR_VERSION_LENGTH char FirmDateCode XLR_DATECODE_LENGTH char MonitorVersion XLR_VERSION_LENGTH char XbarVersion XLR_VERSION_LENGTH char AtaVersion XLR_VERSION_LENGTH char UAtaVersion XLR_VERSION_LENGTH char DriverVersion XLR_VERSION_LENGTH S_XLRSWREV PS_XLRSWREV Purpose This structure is used by XLRGet Version to return software hardwate version strings Members e ApiVersion Version of the StreamStor API library e ApiDateCode Build date of the StreamStor API library e FirmwareVersion StteamStor firmware version e FirmDateCode Build date of the firmware e MonitorVersion Boot monitor firmware version e XbarVersion Controller logic version e AtaVersion ATA controller version e UAtaVersion
134. otected by national copyright laws and international copyright treaties TERM This Agreement is effective from the date of receipt of the StreamStor Product and the Software This Agreement will terminate automatically at any time without prior notice to you if you fail to comply with any of the provisions hereunder Upon termination of this Agreement for any reason you must return the StreamStor Product and Software in your possession or control to Conduant Corporation LIMITED WARRANTY This Limited Warranty is void if failure of the StreamStor Product or the Software is due to accident abuse or misuse Hardware Conduant s terms of warranty on all manufactured products is one year from the date of shipment from our offices After the warranty period product support and repairs are available on a fee paid basis Warranty on all third party materials sold through Conduant such as chassis disk drives PCs bus extenders and drive carriers is passed through with the original manufacturer s warranty Conduant will provide no charge service for 90 days to replace or handle repair returns on third party materials Any charges imposed by the original manufacturer will be passed through to the customer After 90 days Conduant will handle returns on third party material on a time and materials basis CHAPTER 1 INTRODUCTION Software The warranty on all software products is 90 days from the date of shipment from Conduant s offices After 90 days
135. over a different channel of that data without being recorded to disk When StreamStor is operating in passthru mode no disk drives are required any drives that are connected are ignored by StreamStor Both passthru and fork modes are REALTIME ONLY Thus the data must go out at the same speed as it is coming in If not an overflow condition will be signaled see Overflow section below and the data order OF THE OUTPUT STREAM can no longer be guaranteed However in forking mode even an overflow condition WILL NOT JEPORDIZE THE DISK RECORDING in any way Forking is used in situations where the data must be used in real time and recorded to disk simultaneously Forking mode is set by a call to XLRSetMode using the SS_MODE_FORK parameter for the mode Input and output streams are set by calls to XLRBindInputChannel and XLRBindOutputChannel The bound input and output channels must be different A call to either XLRRecord or XLRAppend will start the data flow Make sure that the FPDP port s are configured before record append is called 202 CHAPTER 9 Passthru FORKING AND PASSTHRU gt Data passthru is the simultaneous input and real time output of data Passthru is used in situations where the data must be used in real time and recording that data is not necessary or desired Passthru is configured the same way forking is except that XLRSetMode is passed the SS_MODE_PASSTHRU parameter XLRRecor
136. p Sleep 5 xlrStatus XLRRecord xlrDevice 0 1 Close device befor xiting XLRClose xlrDevice 124 CHAPTER 2 FUNCTION REFERENCE XLRSetLabel Syntax XLR_RETURN_CODE XLRSetLabel SSHANDLE xlrDevice char label UINT labelSize Description XLRSetLabel sets the label on the StreamStor recorder The drives must be idle i e no recording or playback in progress to set a label Note that if you call XLRErase to erase a recorder whether or not the label is erased depends on the erase option you specify Also note that the length returned by XLRGet Length and by XLRGetDirectory does not include the length of the label If the StreamStor is in bank mode this command will set the label for the currently selected bank Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e label isa pointer to a null terminated string no more than XLR_LABEL_LENGTH in size including the NULL e labelSize is the length of label not including the NULL terminator If labelSize is 0 zero the label on the device will be null ed out Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus char label XLR_LABEL LENGTH xlrStatus XLROpen 1 amp xlrDevice strcpy lab
137. pSizeInBytes PAGE_SIZE 100 k 1 printf Creating partition u with size Su bytes Su pages n k pSizeInBytes pSizeInBytes PAGE_SIZE if XLRPartitionCreate xlrDevice pSizeInBytes l XLR_SUCCESS rintf Could not create partition u n k RGetErrorMessage errorMessage XLRGetLastError rintf Error s n errorMessage RClose xlrDevice exit 1 lt O x O Select the partition that is to be labeled if XLRPartitionSelect xlrDevice k XLR_SUCCESS printf Could not select partition u n k XLRGetErrorMessage errorMessage XLRGetLastError printf Error is s n errorMessage XLRClose xlrDevice exit 1 Label the partition that is selected sprintf label Partition_ u n k if XLRSetLabel xlrDevice label UINT strlen label XLR_SUCCESS printf Could not label partition u n k XLRGetErrorMessage errorMessage XLRGetLastError printf Error is s n errorMessage XLRClose xlrDevice exit 1 Print information about the two partitions for k 0 k lt 2 k if XLRPartitionSelect xlrDevice k XLR_SUCCESS 197 CHAPTER 8 DRIVE PARTITIONING printf Could not select partition u n k
138. r with playback s n errMessage XLRClose xlrDevice exit 1 Sleep allowing playback to continue Stop playback XLRStop xlrDevice bytesPlayed XLRGetPlayLength xlrDevice printf Number of bytes played llu n bytesPlayed XLRClose xlrDevice 89 CHAPTER 2 FUNCTION REFERENCE See Also XLRStop XLRRead XLRSetPlaybackLength XLRGetPlayLength XLRSetMode XLRSetDBMode XLRSetBankMode and XLRSelectBank 90 CHAPTER 2 FUNCTION REFERENCE XLRPlaybackLoop Syntax XLR_RETURN_CODE XLRPlaybackLoop SSHANDLE xlrDevice ULONG startHigh ULONG startLow ULONG lengthHigh ULONG lengthLow Description XLRPlaybackLoop starts data playback and loops back to the start position when the end of data is reached or when the requested playback length is reached startHigh and start Low designate the start position i e the requested offset into the device at which to begin playback lengthHigh and lengthLow designate the playback length i e the requested number of bytes to play If the playback length is zero the StreamStor will play back all of the data and then loop playing back data beginning at the start position Playback will continue looping until XLRSt op is called If the playback length is not zero then looping will occur when the number of bytes played equals the requested playback length Parameters 1 xlrDevice is the devic
139. rDevice RGetDBInfo xlrDevice dbInfo terboard type is s n dbInfo PCBType nfo 50 CHAPTER 2 FUNCTION REFERENCE XLRGetChassisType Syntax UINT XLRGetChassisType SSHANDLE xlrDevice Description XLRGetChassisType retrieves an integer value representing the chassis type The defined values for chassis types are gt TK200 a chassis that can hold two drive modules and supports bank switching gt UNKNOWN_CHASSIS_TYPE any chassis that is not a TK200 and therefore does not support bank switching Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value The chassis type as described above Usage SSHANDL xlrDevice UINT chassisType XLR_RETURN_CODI xlrStatus sal 7 xlrStatus XLROpen 1 amp xlrDevice chassisType XLRGetChassisType xlrDevice if chassisType TK200 printf This system supports bank switching n xlrStatus XLRSetBankMode xlrDevice SS_BANKMODE_ NORMAL xlrStatus XLRSelectBank xlrDevice BANK_B else printf This system does not support bank switching n Close device befor xiting XLRClose xlrDevice See Also XLRSetBankMode and XLRSelectBank 51 CHAPTER 2 FUNCTION REFERENCE XLRGetDevicelnfo Syntax XLR_RETURN_CODE XLRGetDeviceInfo SSHANDLE xlrDevice PS_DEVINFO pDevinfo T 25
140. rDevice 0 if xlrStatus XLR_SUCCESS return 1 xlrStatus XLRRecord xlrDevice 0 1 if xlrStatus XLR_SUCCESS return 1 See Also XLRClearChannels XLRBindOutputChannel and XLRSelectChannel 28 CHAPTER 2 FUNCTION REFERENCE XLRBindOutputChannel Syntax XLR_RETURN_CODE XLRBindOutputChannel SSHANDLE xlrDevice UINT channel Description XLRBindOutputChannel binds a channel for output FROM StreamStor In other words output is relative to StreamStor To playback over a particular channel that channel must be bound to StreamStor via this command XLRClearChannels must be called to unbind the channel s before calling XLRBindOutputChannel Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e channel is the channel number to bind this is card specific Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Note CHANGING MODES CLEARS ALL INPUT AND OUTPUT CHANNELS CHANNELS MUST BE BOUND AFTER THE MODE IS SELECTED Usage SSHANDLE xlrDevice S_READDESC readDesc XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice xlrStatus XLRClearChannels xlrDevice Set StreamStor mode to Single Channel lrStatus XLRSetMode xlrDevice SS_MODE_SINGLE_CHANNEL x Bind the cha
141. rating system and computer hardware facilitates predictable and repeatable behavior better or additional control over timing and other parameters higher bus utilization efficiency due to non arbitrated nature access to interface signals without risk of crashing host computer higher data rates than the most common PCI buses support and the potential for dual port operation simultaneous transfers on both PCI bus and external ports while recording or playing back 170 CHAPTER 5 FPDP Overview Interface gt EXTERNAL PORT The FPDP Front Panel Data Port external port feature is included on a variety of StreamStor controllers The hardware manual for your StreamStor controller or daughterboard will indicate if FPDP is supported on it and will provide any other model specific details FPDP is a 32 bit synchronous data bus that allows data to be transferred at high speeds between devices Simple and low cost in its implementation FPDP supports the necessary flow controls to manage transfers between devices of different speeds The sustained speed on the StreamStor interface varies depending on the StreamStor controller model In reading the following sections on using this feature it is important to be familiar with the American National Standard for Front Panel Data Port Specifications ANSI VITA 17 1998 This manual is intended to clarify StreamStor s operation as it relates to the standard not to educate one on the s
142. rd in a pre trigger mode where data is captured continuously until the trigger and then a specified number of data points are captured after the trigger The data acquisition card will then continuously cycle through its memory buffer until receiving the trigger StreamStor will continuously record all of the data however up to its full capacity To use the recorder in this fashion you should enable the Wrap feature in the XLRRecord function so that StreamStor will overwrite the oldest data if the disk system is full 166 CHAPTER 4 Data Wrap Ending the OPERATION In order to capture the maximum amount of data without overwriting old data the StreamStor system is designed to exit record mode when the disk subsystem is filled to capacity unless Wrap has been set The user application can poll the device status using XLRGetDeviceStatus watching for Recording to go FALSE A normal XLRStop command should then be used to end record mode Note that the StreamStor controller is designed to accept data on the PCI bus even after the disk subsystem is full to prevent system errors and allow you to shut down the data source after completely filling the available disk space In some recording applications it is desirable to continue recording past the capacity of the recording system by overwriting the oldest recorded data This is sometimes called pretrigger or circular recording The StreamStor sys
143. re to be filled by this function call Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus S_DIR xlrDir xlrStatus XLROpen 1 amp xlrDevice Record some data XLRStop xlrDevice xlrStatus XLRGetDirectory xlrDevice amp xlrDir if xlrStatus XLR_SUCCESS return 1 See Also XLRGetLength XLRSetMode XLRSelectChannel XLRSet BankMode XLRSelectBank C 54 and CHAPTER 2 FUNCTION REFERENCE XLRGetDrivelnfo Syntax XLR_RETURN_CODE XLRGetDrivelInfo SSHANDLE xlrDevice UINT Bus UINT MasterSlave PS_DRIVEINFO pDrivelInfo T Description XLRGetDrive Info retrieves info from the StreamStor drive about its physical configuration If the StreamStor is in bank mode this command will get drive information for the drives in the currently selected bank Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e Bus is the ATA bus number of the drive e MasterSlave is XLR_MASTER_DRIVE 0 of XLR_SLAVE_DRIVE 1 to select the master or slave drive on the ATA bus r e pDrivetInfo isa pointer to an S_DRIVEINFO structure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL
144. ree to the terms of this Agreement do not install or use the StreamStor Product and return it to Conduant Corporation GRANT OF LICENSE In consideration for your purchase of the StreamStor Product Conduant Corporation hereby grants you a limited non exclusive revocable license to use the software and firmware which controls the StreamStor Product hereinafter the Software solely as part of and in connection with your use of the StreamStor Product If you are authorized to resell the StreamStor Product Conduant Corporation hereby grants you a limited non exclusive license to transfer the Software only in conjunction with a sale or transfer by you of the StreamStor Product controlled by the Software provided you retain no copies of the Software and the recipient agrees to be bound by the terms of this Agreement and you comply with the RESALE provision herein NO REVERSE ENGINEERING You may not cause or permit and must take all appropriate and reasonable steps necessary to prevent the reverse engineering decompilation reverse assembly modification reconfiguration or creation of derivative works of the Software in whole or in part OWNERSHIP The Software is a proprietary product of Conduant Corporation which retains all title rights and interest in and to the Software including but not limited to all copyrights trademarks trade secrets know how and other proprietary information included or embodied in the Software The Software is pr
145. rent recording as a 64 bit integer This function can be used during an active recording or FIFO operation Note that during active record and FIFO operations the returned value may not be exact since data is still moving between devices If the StreamStor is in bank mode this command will return the length of data on the currently selected bank If data on the StreamStor was recorded in multi channel mode this command will return the length of data recorded on the currently selected channel Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value e Current recording length in bytes Usage SSHANDLE xlrHandle DWORDLONG recordingLength XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrHandle recordingLength XLRGetLength xlrHandle See Also XLRGetDirectory XLRGetBankStatus XLRSelectBank XLRSetMode and XLRSelectChannel 64 CHAPTER 2 FUNCTION REFERENCE XLRGetLengthLowHigh Syntax void XLRGetLengthLowHigh SSHANDLE xlrDevice PULONG low PULONG high Description XLRGetLengthLowHigh returns the current recording length in bytes in two 32 bit variables This function is provided for programming environments unable to handle 64 bit integers If the StreamStor is in bank mode the values returned will be for the recording on the currently selected bank If data on the StreamStor was recorded in mul
146. riencing problems running this program will perform a configuration and confidence test to insure that your system is working properly The DLL file bisrun dll is a required component It should have been installed automatically into the installation directory If sscfg exe is moved you must also move bisrun d11 to the same directory or to a Windows system directory The initial sscfg screen will look something like this 13 CHAPTER 1 INTRODUCTION we Siea Aon Conlsirationflose thf Card Numb CCC date OU A NT earths Bat StreamStor Status Inactive SDK 5 4 r Card Info r Revisions Total Capacity jo DLL Number of Drives oe Firmware Board Type Unknown bar Serial Number i on Monitor PCI Bus jf ATA Slot Number fo Driver Initialize Test Reset Drive Info If more than one StreamStor is installed in your system there will be multiple choices in the card number pull down menu After selecting the card number you must press the In alze button to begin the process of finding initializing and querying the StreamStor board for device information If your board has been successfully configured Initialize will enable the Test button and fill in the various device information fields The sscfg screen should now appear similar to this 14 CHAPTER 1 INTRODUCTION we Sirenas Comi pianon Aesi K 5 ee Card Number i StreamStor Status Ready SDK 5 4
147. ription XLRGet Sample retrieves sample data from StreamStor during a recording Prior to calling XLRGet Sample you must call XLRSet SampleMode to place the StreamStor in sampling mode In order to retrieve samples data must be actively transferring to the StreamStor Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e bufSizeis the size of the buffer pointed to by pBuffer This size must match the size specified in the call to XLRSet SampleMode e pBufferis the pointer to the buffer to hold the sample data Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage define SAMPLE SIZE 0x800000 SSHANDLE xlrDevice PULONG pBuffer NULL XLR_RETURN_CODE xlrStatus xlrStatus XLROpen 1 amp xlrDevice pBuffer PULONG malloc SAMPLE_SIZE Turn on sampling xlrStatus XLRSetSampleMode xlrDevice SAMPLE_SIZE SS_SAMPLEMODE_NORMAL Start recording xlrStatus XLRRecord xlrDevice 0 1 Wait a few seconds to get data flowing Request first sample xlrStatus XLRGetSample xlrDevice SAMPLE SIZE pBuffer See Also XLRSetSampleMode 73 CHAPTER 2 FUNCTION REFERENCE XLRGetSystemAddr Syntax ULONG XLRGetSystemAddr SSHANDLE xlrDevice Description XLRGetSystemAddr returns the kernel address o
148. rt playback at the beginning of the recording in this example Poll every 10 seconds to see if playback has stopped Note if you use polling to check status the more often you poll the greater the impact on performance XlrReturnCode XLRPlayback xlrDevice 0 0 do Sleep for 10 seconds then poll device status XlrReturnCode XLRGetDeviceStatus xlrDevice amp devStatus while devStatus Playing TRUE See Also XLRPlayback XLRGetPlayLength XLRSetMode XLRSetDBMode XLRSetBankMode and XLRSelectBank 131 CHAPTER 2 FUNCTION REFERENCE XLRSetPortClock Syntax T XLR_RETURN_CODE XLRSetPortClock SSHANDLE xlrDevice UINT clock Description XLRSetPortClock is used to set the operating frequency of the external port if applicable Before calling XLRSetPortClock you must call XLRSelectChannel to select the desired channel Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen e clock is a constant that defines the desired clock frequency Possible values are defined in the header file x lrdbcommon h as SS_PORTCLOCK_xMHz values The FPDP clock is programmable from 6 MHz up to 50 MHz Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage Set the external clock frequency SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode
149. s XLROpen 1 amp xlrDevice xlrReturnCode XLRGetVersion xlrDevice amp swVersion if xlrReturnCode XLR_SUCCESS xlrError XLRGetLastError XLRGetErrorMessage temp xlr printf s n temp exit 1 i rror H printf Firmware version s n swVersion FirmwareVersion See Also XLRApiVersion and XLRGetDBInfo 78 CHAPTER 2 FUNCTION REFERENCE XLRGetWindowAddr Syntax PULONG XLRGetWindowAddr SSHANDLE xlrDevice Description XLRGetWindowAddr returns the user virtual address of the recording data window This address can be used to directly write data to the StreamStor device from a user program Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value This function returns a pointer to the data window mapped into the user virtual address space Usage PULONG xlrAddress SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturn xlrReturn XLROpen 1 amp xlrDevice if xlrReturn XLR_SUCCESS xlrAddress XLRGetWindowAddr xlrDevice xlrAddress someData SomeData has been written to the StreamStor device note that xlrAddress does not need to be incremented for subsequent writes 79 CHAPTER 2 FUNCTION REFERENCE XLRMountBank Syntax XLR_RETURN_CODE XLRMountBank SSHANDLE xlrDevice UINT bankId T Description
150. s XLR_FAIL Usage SSHANDLE xlrHandle S_DIR xlrDir XLR_RETURN_CODE xlrReturn XLR_ERROR_CODE xlrError char temp XLR_ERROR_LENGTH xlrStatus XLROpen 1 amp xlrDevice xlrReturn XLRGetDirectory xlrHandle amp xlrDir if xlrReturn XLR_SUCCESS xlrError XLRGetLastError F XLRGetErrorMessage temp xlrError printf Error message s n temp exit 1 zy E See Also XLRGetLastError 57 CHAPTER 2 FUNCTION REFERENCE XLRGetEvents Syntax T XLR_RETURN_CODE XLRGet IN UINT bufSize Description Events IN SSHANDLE xlrDevice OUT PS_EVENTS events XLRGetEvents retrieves events that were captured as a result of setting one or more event options when calling the XLRSetDI option set to SS_OPT_ option Parametets EV BMode function Le calling XLRSetDBMode with ENTLOG bit wise inclusively ored with an SS_OPT_EV ENT_ e xlrDevice is the device handle returned from a previous call to XLROpen e bufsize is the size in bytes of events ENTS structure that is to receive the events e events isa pointer to the S_LEV Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 58 CHAPTER 2 FUNCTION REFERENCE Usage
151. s function returns XLR_FAIL 70 CHAPTER 2 FUNCTION REFERENCE Usage Example showing how to use the playback trigger and get the play buffer status SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus UINT playBuffStatus XLROpen 1 amp xlrDevice Setup channel for playback Prepare for playback xlrStatus XLRSetOption xlrDevice SS_OPT_PLAYARM Since the playback buffer is not in use yet the status returned here should be SS_PBS_IDLE Sif xlrStatus XlrGetPlayBufferStatus xlrDevice amp playBuffStatus Since SS_OPT_PLAYARM has been set this call to XLRPlayback will not cause the data to flow yet Li xlrStatus XLRPlayback xlrDevice 0 0 XLURPlayback has been called but XLRPlayTrigger has not The status of the playback buffer should be SS_PBS_FILLING now xlrStatus XlrGetPlayBufferStatus xlrDevice amp playBuffStatus Call XlrGetPlayBufferStatus periodically until the status of the playback buffer is SS_PBS_FULL Buffer is now full so call XLRPlayTrigger to start the data flowing out of the buffer xlrStatus XLRPlayTrigger xlrDevice playback the desired length of time Stop the playback XLRStop xlrDevice See Also XLRPlayTrigger XLRSetOption and XLRPlayBack 71 CHAPTER 2 FUNCTION REFERENCE XLRGetPlayLength Syntax
152. s to XLRRecord XLRAppend or XLRErase will return an error The drives must be idle i e no recording or playback in progress to set the write protection Physical removal and reinsertion of the drives will not change the write protection The only way to remove the write protection is to call XLRClearWriteProtect By default drives are not write protected The drives must be idle i e no recording or playback in progress to set the write protection If the StreamStor is in bank mode this command will set write protection only on the selected bank Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 138 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus Open the devic xlrStatus XLROpen 1 amp xlrDevice We know we want to reuse these disks and that they were previously write protected Clear the protection so we can erase the drives and start a fresh recording xlrStatus XLRClearWriteProtect xlrDevice xlrStatus XLRErase xlrDevice SS_OVERWRITE_NONE Start recording xlrStatus XLRRecord xlrDevice 0 1 xlrStatus XLRStop xlrDevice Write protect this recording xlrStatus XLRSetWriteProtect xlrDevice Close devic
153. s_to_get are set If TRUE all of the options in options_to_get are set If set to FALSE one or more of the options in options_to_get are not set Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus BOOLEAN options_on xlrStatus XLROpen 1 amp xlrDevice See if an option is set xlrStatus XLRGetOption xlrDevice SS_OPT_PLAYARM amp options_on if options_on TRUE printf PlayArm option is set n else printf PlayArm option is not set n See Also XLRSetOption and XLRClearOption 68 CHAPTER 2 FUNCTION REFERENCE XLRGetPartitionInfo Syntax XLR_RETURN_CODE XLRGetPartitionInfo SSHANDLE xlrDevice PS_PARTITIONINFO pPartitionInfo Description XLRGetPartitionInfo retrieves information from the StreamStor about the currently selected partition Parametets e xlrDevice is the device handle returned from a previous call to XLROpen e pPartitionInfo is a pointer to an S_PARTITIONINFO structure Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice S_PARTITIONINFO partitionInfo Open the devic if XLROpen 1 amp xlrDevice XLR_SUCCESS printf ERROR Open
154. se Option Specified Label User Partitions Erased Directory Removed Erased SS_OVERWRITE_NONE No No No SS_OVERWRITE_RANDOM_PATTERN No No No SS_OVERWRITE_RW_PATTERN No No No SS_OVERWRITE_DIRECTORY Yes Yes No SS_OVERWRITE_PARTITION Yes Yes Yes Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturn DWORDLONG xlrLength xlrReturn XLROpen 1 amp xlrDevice r if xlrReturn XLR_SUCCESS return 1 turn XLRErase xlrDevice SS_OVERWRITE_RANDOM_PATTERN if xlrReturn XLR_SUCCESS return 1 X K a 0 Overwrite Erase Examples Example 1 2 20GB drives per bus master slave configuration 45 CHAPTER 2 FUNCTION REFERENCE xlrLength XLRGetLength xlrDevice xlrLength equals approximately 40GB if called at the beginning of the erase Example 2 1 100GB drive per bus master only configuration xlrLength XLRGetLength xlrDevice xlrLength equals approximately 100GB if called at the beginning of the erase See Also XLRSetLabel XLRSetUserDir XLRGetBankStatus XLRGetLength XLRSetWriteProtect XLRClearWriteProtect XLRSetBankMode XLRSelectBank and XLRPartitionSelect 46 CHAPTER 2 FUNCTION REFERENCE XLR
155. ser directories and labels XLRErase will return when this command is complete As with other API functions that record data XLRErase will immediately return control to the calling program If an erase is in progress XLRGetDeviceStatus will indicate that the device is in Recording mode 44 CHAPTER 2 FUNCTION REFERENCE If the SS_OVERWRITE_RANDOM_PATTERN mode is specified and an overwrite operation is in progress a call to XLRGet Length will return the number of bytes remaining to overwrite for the slowest bus Each bus is erased in parallel thus it returns the number of bytes remaining for the slowest bus In other words when the slowest bus completes the entire operation will be complete If the SS_OVERWRITE_RW_PATTERN mode is specified the erase is done in two passes The first pass will read all blocks on the device and the second pass will write all blocks on the device During the read pass a call to XLRGet Length will return the number of bytes remaining to be read During the write pass a call to XLRGetLength will return the number of bytes remaining to be overwritten Stopping StreamStor part way through an overwrite erase will immediately set the directory length to zero Restarting the overwrite erase will start from the beginning not where you previously stopped The following table summarizes what in addition to the data is erased Era
156. setentanedte tenses 86 OER Paya Erer r REAR RORE GORRA RORA RAER OAE AETR RARE 87 XER Play back LG Op ses svocssscescscrsvsacdeecvesesnestevels cote congestierkgratednaeaotatefecsSovenssndtvengtetvorstivapssetonnespeiienonetsesBtvengteticnsys 91 MLR Play rigget iiaii iiss tis eisi iiia isseire iSe iSS iS oai SESE EN iSS iios Sei asti 93 XERRea d hanin E E E EEE EEE E E E EEEE 95 TERR Ca Dati a aa O E A A O RA A AO 96 A RR ed Oa a a A A At 97 XERR adimmed sisnseen innn a a E a boc rara aat 98 XLRReadSm rtThresh ldssenniesserenmennennnen na seas E E A E ES 100 IER REAAS MAVA UES vasecscecescsscevecs decane a e E E C ARARO R ARRERA 102 KIER CaS tats nnrir eiaeia e RRO AER NOR TRR Maeda ess 104 XERRE AT ORDY deee e a e a A E T E A ES 106 XERRecotdu nenn ha WAS KANE AE E E a aa A ORICA ANAM EH ARAN 107 DRIERIRECO Ver Datan eoa cue REE E E T suns oveasveseacdsved Seceaueoneasvacessetoeasuhsouaonen acess se TEE 109 TERRES etic csevescucceiescheseuecckesvescbccteestvsceucscke ccve seus lovestvaseus deus Sovocdoblassdvabessldbelsasbaveesselcdabanksdexedevoseucdevedevedeecsases 111 XERRetrieve Events scisvescesscsecousscvscduccateones R couecondonvsceeecundonseceescve snscens cond cveasvesseresivocesrcbeerveses 112 KTR Se leGtB arises cies sh rsebls shies aeae i E EE E teas taestovasbesiaesivente sieves A ENAS 114 KERSelect haninel s s5 25555 fesse bess leashes a ae Sasa an ede ne es 116 NIRS SIE ES teeren er A EAE T TT EE T EAE RS 117 MERSEtBank Mod Cyc sees vvc
157. ster drive n else Interpret the SMART values See Also XLRReadSmartThresholds XLRGetDrivelInfo XLRSet BankMode and XLRSelectBank 103 C HAPTER 2 FUNCTION REFERENCE XLRReadStatus Syntax XLR_RI Description ETURN_CODE T XLRReadStatus BOOLEAN Wait XLRReadStatus checks status of a read request issued with XLRReadImmed data from the StreamStor device If the StreamStor is in bank mode this command will check the status of the currently selected bank Parametets Wait is a flag to indicate whether to wait for completion of the read request If TRUI CI the function will not return until the read is complete or an error has occurred Return Value If the read request has completed XLR_RI If the read request is waiting to execute XLR_RI If the read request is currently executing XLR_RI If an error occurred during execution of the request XLR_R HAD_COMP LETE HAD WAITING EAD RUNNING EAD ERROR Usage SSHANDLE xlrDevice S_READDESC readDesc ULONG myBuffer 40000 XLR_READ_STATUS readStatus XLR_RETURN_CODE xlrReturnCode xlrReturnCode XLROpen 1 amp xlrDevice readDesc AddrHi 0 readDesc AddrLo OxFE120000 readDesc XferLength sizeof myBuffer readDesc BufferAddr myBuffer xlrReturnCod XLRReadImmed whil
158. t BankMode and XLRSelectBank 96 CHAPTER 2 FUNCTION REFERENCE XLRReadFifo Syntax Tj p lt T XLR_RETURN_CODE XLRReadFifo SSHANDLE xlrDevice PULONG Buffer ULONG Length BOOLEAN Direct Description XLRReadFifo reads data from the StreamStor device during a FIFO operation Data can continue to be read with this function until the FIFO is empty or XLRStop is called Note that the device must be in record mode when XLRReadFi fo is called A second call to XLRSt op is required to take the StreamStor out of record mode For general information on FIFOs please refer to the Forking and Passthru chapter of this manual XLRGetFIFOLengthExample c which is in the StreamStor SDK example directory shows how to use various FIFO commands Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen e Buffer is the address of the buffer to receive the read data e Length is the length of data to transfer in bytes e Direct isa flag that indicates if the supplied Buffer address is a physical address for direct transfer For normal transfer to a user memory buffer this flag should be FALSE 0 Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL or Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode ULONG myBuffer 40000 ll x xlrReturnCode LROpen 1
159. t be empty for this command 192 XLR_ERR_UNKNOWN_DIR_ The directory version found is VERSION newer than the current firmware can handle 193 XLR_ERR_DATA_INTEGRITY Data integrity check failed 194 XLR_ERR_HWVERSION XBAR version incompatible with Firmware version 195 XLR_ERR_ARRAY_TOO_SMALL User supplied array is too small 196 XLR_ERR_READFATL_ FORK Read failure during fork 197 XLR_ERR_INVALID_ Offset or transfer length of read ALIGNMENT request is not aligned on the required 4 or 8 byte boundary 300 XLR_ERR_PORT_NOT_FOUND Port is unavailable Serial Ethernet interfaces only 301 XLR_ERR_PORT_ACCESS _ Port access is denied DENIED Serial Ethernet interfaces only 212 APPENDIX A ERROR CODES 302 XLR_ERR_PORT_TIMEOUT Port operation has timed out 303 XLR_ERR_CONNECT_ Connection refused by target REFUSED 213 APPENDIX A ERROR CODES End of Document
160. t e E EA EEA ENEAN 13 Windows Tenhi uiie iann e aae aaae aoa o oo 15 Windows Tabra h ae aa e eA E ATE EAT A A OET AEA 18 Enue Unman e e Ae E E N AE E os ah ads O N A T 18 E E a e I OO O E N E A EAA E A A Gia 19 TEU OTAOTA eE E O E E E T E O EE EA R R 21 Data SITULUI E AR EEREN AA N A AA AAA E T 22 Chapter 2 Function Reference sssssssssssssssssrrsrrrrrrsrrsrreerrerrerrerens 23 MIRA PIV C51 ON cies cassseiesessnietessseandoveieseanveiesssnaniodednseiniodetsiesndosedesednvedeledeaniodetesvandedeteseaniedeibsansnedetedeandedetesnsedeze 24 MLR A Ppenid diaii EE EEEE ESEESE ESSET E SiiS 25 XERAtMEP DP aaaea nE EES E EEEE EE EE EEEE EEEE EEEE SEE SEEE EESK E EEEE 27 XUERBindInputChann el is sss vestosseavs oneri EE deans Svea ds AR A iR 28 XLRBindOutp tChannels aiene a ae a a A a E a A E ARo EEE 29 MIR Cat CE E E E AEE 31 MER Clear Chan tiels snein E E EAEN E S ES ERR OA 32 XERE OPI Ofe onere E covert E E A E E O E RE 33 OER Cleat WriteProtec traad castes cata daas diaaa daidai dadadada dai 34 DAL AEE E OAA E E E 35 MUR DeleteA ppend vicscscissectsssssstasssscsssedissdisseasssseinseatedessssasdeseideassedssascasspaaiossatbadesssusnseaeissedbbodsbsseaeseaetvanseaede 36 MLR D evice Pia isseis sessed t EEEE EE EE EEE AEE EEEE 38 XERDismo ntBank sininen iiaii A R R a aiie 39 NORE a PE EEE AAA EE E E A T 40 DAMA Ea Nia ata E EEE 42 XLRETAS C eneeier iE NEEE ETAN EEE EEE EEES EERE EREE EE E EE 44 MER GELB aS tats os sissvses iesitot asst iN tEn E ARR
161. tBankMode and XLRSelectBank CHAPT ER 2 FUNCTION REFERENCE XLRGetBaseAddr Syntax ULONG XLRGetBaseAddr SSHANDLE xlrDevice T Description XLRGet BaseAddr returns the physical address of the recording data window This address can be used to program PCI hardware devices for direct card to card data transfer The address returned from this function is NOT a valid user address Parametets e xlrDevice is the device handle returned from a previous call to XLROpen Return Value This function returns the physical PCI address as a 32 bit unsigned integer Usage ULONG xlrAddress SSHANDLE xlrDevice XLR_RETURN_CODE xlrStatus xilrStat us XLROpen 1 amp xlrDevice if xlrStatus XLR_SUCCESS Error opening StreamStor else xlrAddress XLRGetBaseAddr xlrDevice 48 CHAPTER 2 FUNCTION REFERENCE XLRGetBaseRange Syntax ULONG XLRGetBaseRange SSHANDLE xlirDevice T Description XLRGetBaseRange returns the size of the StreamStor device data window in bytes This range of addresses is intended to be used by hardware transferring data that cannot be programmed to write with a non incrementing address Note that the address used to write to StreamStor does not effect the storage location of the data StreamStor always stores data sequentially in the order it is written regardless of the address
162. tandard itself For additional information about the standard other FPDP products and manufacturers and other technical details regarding FPDP please visit www fpdp com The StreamStor FPDP interface is designed to meet and exceed the basic capabilities of FPDP as defined in the FPDP ANSI standard The following sections describe any optional FPDP features StreamStor has implemented any features that StreamStor has implemented as a superset to the standard any known deviations form the ANSI standard any clarifications that might otherwise be left open to interpretation and the API functions necessary to configure an external port Electronics Interface electronics and termination values on StreamStor are those recommended by the ANSI standard though some signals and terminations can be electronically connected or isolated with crossbar switching devices in order to support electronic reconfiguration 171 CHAPTER 5 EXTERNAL PORT Data Formats The FPDP is a multi drop bus intended to carry either framed or unframed data StreamStor currently supports only the unframed data mode The SYNC Sync Pulse signal is drtven to an inactive state while StreamStor is a data transmitter on the FPDP bus Contact Conduant for more information on using framed data PIO Signals PIO signals are programmable lines for I O for user defined functions These are ancillary signals and are not required for the FPDP fu
163. tem supports this recording mode by setting the Wrap bit in the XLRRecord command The recorder will continue to record after the disk capacity is exhausted by overwriting the oldest data on the disks Once the recording is finally stopped the XLRGetLength command can be used to determine how much data has been recorded If your data is blocked in anything other than 4 byte blocks you will need to index back from the end of the data to find an aligned start point of your data Contact technical support for more information on using this feature Recording If storage wrapping mode has not been enabled StreamStor will continue to record data until all recording space has been exhausted or the XLRStop function has been called If the XLRStop function is not used any data written to the StreamStor data range after space is exhausted will be lost If data wrapping has been enabled StreamStor will continue to record data indefinitely until the XLRStop function is called When free storage space has been exhausted the system will begin to overwrite the oldest data so that the newest data is kept NOTE A data acquisition system can stop recording by simply ceasing any writes to the StreamStor data address range The XLRStop function should still be used to flush all data to the disk drives and to prepare fot reading of the data Data Read Because operating systems cannot handle the massive file sizes resulting from a long recording th
164. the device handle returned from a previous call to XLROpen e EventLog is an array of 64 bit integers Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode DWORDLONG Events MAX_EVENTS UINT i 0 xlrReturnCode XLROpen 1 amp xlrDevice xlrReturnCode XLRRetrieveEvents xlrDevice Events if xlrReturnCode XLR_SUCCESS printf ERROR n return 1 for i 0 i lt MAX_EVENTS i No mor vents recorded printf Event d Sull n i Events i 112 CHAPT ER 2 See Also XLRGet Events FUNCTI XLRGet ON REFERENCE EventsLength and XLRSetDI 113 BMode CHAPTER 2 XLRSelectBank FUNCTION REFERENCE Syntax XLR_RI ETURN_COD I E XLRSelect Bank SSHANDLI Description XLRSelect E xIlrDevice U INT bankID Bank will select the specified bank Subsequent calls to bank aware commands will then perform their operations on the selected bank For example if BANK_B is the currently selected bank then a subsequent call to XLRSet Label will label BANK_ B Once a bank is selected that bank remains selected until the other bank is explicitly selected ot the StreamStor mode is changed For example say
165. ti channel mode the values returned will be for the data recorded on the currently selected channel Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e lowis a pointer to a ULONG unsigned int that will be written with the lower 32 bits of the recording size in bytes e high isa pointer to a ULONG unsigned int that will be written with the upper 32 bits of the recording size in bytes Return Value e None See Also XLRGetDirectory XLRGetBankStatus XLRSelectBank XLRSetMode and XLRSelectChannel 65 CHAPTER 2 FUNCTION REFERENCE XLRGetLengthPages Syntax ULONG XLRGetLengthPages SSHANDLE xlrDevice Description XLRGetLengthPages returns the current recording length in units of system pages This function is provided for programming environments unable to handle 64 bit integers Windows environments typically utilize a page size of 4096 bytes but this should be checked using a query to the operating system If the StreamStor is in bank mode the value returned will be for the recording on the currently selected bank If data on the StreamStor was recorded in multi channel mode the values returned will be for the data recorded on the currently selected channel Parametets e xl1rDevice is the device handle returned from a previous call to XLROpen Return Value e Recording length in system pages See Also XLRGetDirectory XLRGetBankStatus XLRSele
166. tory and recover data xlrReturnCode XLRRecoverData xlrDevice SS_RECOVER_POWERFAIL See Also XLRPartitionSelect CHAPTER 2 FUNCTION REFERENCE XLRReset Syntax XLR_RETURN_CODE XLRReset SSHANDLE xlrDevice Description XLRReset will attempt to reset a StreamStor device and re initialize the hardware and firmware This function should be used only as a last resort Parametets e xI1rDevice is the device handle returned from a previous call to XLROpen Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage SSHANDLE xlrDevice XLR_RETURN_CODI xlrReturnCode 7 ll x xlrReturnCode LROpen 1 amp xlrDevice ll x xlrReturnCode LRReset xlrDevice See Also XLRCardReset 111 CHAPTER 2 FUNCTION REFERENCE XLRRetrieveEvents Syntax XLR_RETURN_CODE XLRRetrieveEvents SSHANDLE xlrDevice DWORDLONG EventLog T T Description XLRRetrieveEvents downloads an array of 64 bit integers into the EventLog array Each integer is an offset into the current recording An event is recorded for each FPDP SYNC pulse if the SS_OPT_FPDPEVENTLOG option is set in XLRSetDBMode A maximum of MAX_EVENTS events can be captured Positions in the EventLog array that do not contain an event are set to 0 Parameters e xl rDevice is
167. ts of the 64 bit address to use for the new last append start point In most cases this should be zero e AddrLowis the upper 32 bits of the 64 bit address to use for the new last append start point In most cases this should be zero Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 36 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CO A X lrStatus Open the devic Append data xlrStatus XLRAppend xlrDevice xlrStatus XLROpen 1 amp xlrDevice Stop recording XLRStop xlrDevice Delete just the data recorded above xlrStatus XLRDeleteAppend xlrDevice 0 0 Close device befor xiting XLRClose xlrDevice See Also XLRTruncate XLRSetBankMode and XLRSelectBank 37 CHAPTER 2 FUNCTION REFERENCE XLRDeviceFind Syntax UINT XLRDeviceFind Description XLRDeviceFind searches the PCI bus es and returns the number of StreamStor cards present in the system Parametets None Return Value This function returns the number of StreamStor cards in the system If the driver has not been installed properly this function returns zero Usage UINT NumCards if NumCards XLRDeviceFind There are StreamStor cards on this system printf StreamStor cards found d n NumCards else No Stre
168. turned from a previous call to XLROpen e AddrHighis the upper 32 bit value of the 64 bit address to begin reading e AddrLowis the lower 32 bit value of the 64 bit address to begin reading Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 87 CHAPTER 2 FUNCTION REFERENCE Usage This example shows how you can stream data out the external FPDP port include lt stdio h gt include lt stdlib h gt include xlrapi h int main int argc char argv SSHANDLE xlrDevice S_DEVINFO devinfo DWORDLONG bytesPlayed DWORDLONG offset DWORDLONG recordingLength ULONG AddrHi ULONG AddrlLo XLR_RETURN_CODE xlrStatus char errMessage XLR_ERROR_LENGTH xlrStatus XLROpen 1 amp xlrDevice if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Error opening device s n errMessage exit 1 xlrStatus XLRGetDeviceInfo xlrDevice amp deviInfo if xlrStatus XLR_SUCCESS XLRGetErrorMessage errMessage XLRGetLastError printf Error getting device information s n errMessage XLRClose xlrDevice exit 1 Use the external port for playback xlrStatus XLRSetMode xlrDevice SS_MODE_ SINGLE CHANNEL j if xlrStatus XLR_SUCCESS XLR
169. uded for linking the DLL functions to a user program The required include files are xlrapi h xlrtypes h and xlrdbcommon h Only the xlrapi h file needs to be included in a user program Example programs are included in the SDK All of the include files are installed automatically by the installation software in the Include directory The library file for linking user programs is installed in the Lib directory and the DLL is installed in the StreamStor installation directory Linux Uninstall The StreamStor SDK can be easily uninstalled in Linux by removing the installation directory and the WinDriver module To do so enter the following commands as root where lt InstallDir gt is the full path name where the StreamStor SDK is installed and lt WinDriverModule gt is the name of the WinDriver module The WinDriver module is windrvr6 1 Remove the SDK installation directory as follows rm rf lt InstallDir gt For example to remove the entire SDK rm rf usr local streamstor 2 Remove the WinDriver module as follows a Verify that the WinDriver module is not in use b Unload the WinDriver module by entering rmmod lt WinDriverModule gt c Remove the old device node by entering rm rf dev lt WinDriverModule gt d Remove the system startup file if it exists by entering rm rf etc windriver rc 18 CHAPTER 1 INTRODUCTION e Remove the user startup file if it exists by entering r
170. ur software development efforts Other drivers and examples may be available depending on your choice of data acquisition hardware Contact Conduant support for more information 12 CHAPTER 1 INTRODUCTION Always review the readme html file included with the SDK for the latest information not included in this manual Software Components The SDK software components include operating system device drivers support files programming libraries and utility programs Device Driver The StreamStor SDK provides device driver support for the Windows 2000 Windows XP and Linux operating systems The drivers are installed automatically by the supplied setup program On Windows systems the device driver is named windrvr6 sys The Linux device driver is installed as a kernel module named windrvr6 On Linux systems refer to the file linux docs install txt on the CD ROM for driver installation instructions Windows Uninstall The StreamStor SDK can be easily uninstalled in Windows by using the Add Remove Software wizard in the control panel Simply select StreamStor SDK and all installed components will be automatically removed You can also select Remove StreamStor SDK in the StreamStor menu Windows Configuration Test Utility The utility program sscfg exe is included with the SDK for testing the StreamStor system for proper configuration and functionality If you have just received your StreamStor system or you are expe
171. us Windows programming languages such as Visual C and Visual Basic as well as graphical programming environments such as LabVIEW Installing the Software Your StreamStor system was shipped with the Software Development Kit on CD ROM Please power up your computer On Windows systems when ready run the setup exe program on the CD ROM to start the installation process On Linux systems refer to the file Linux docs install txt on the CD ROM Plug and play operating systems such as Windows will detect the installation of the StreamStor board and attempt to configure the boards using the hardware plug and play wizard program The required installation information file for plug and play installation is included on the CD ROM Make sure the plug and play wizard includes the CD ROM drive in its search so that the StreamStor drivers will be properly installed You should not cancel the plug and play wizatd since this can create hardware conflicts in the system when using the StreamStor controller Note that the setup exe program must still be executed to install the StreamStor SDK onto your system The software installation procedure will install the device drivers library files example programs and all other components of the SDK onto your system The StreamStor SDK does not include software interfaces or drivers used for the control of data acquisition cards made by other manufacturers However it does include some sample programs to help in yo
172. y Linux Library When the SDK is installed on a Linux system a static function library is installed named libssapi a It contains all the StreamStor API functions The required header files ate xlrapi h xlrtypes h and xlrdbcommon h Only the xlrapi h file must be included by the user application The library must be supplied to the linker to create a final executable program An example C program that shows how to call the SDK library functions and a corresponding gcc makefile are in the directory lt InstallDir gt Linux example 21 CHAPTER 1 INTRODUCTION Data Structures StreamStor API functions use the following structures Refer to the end of the Function Reference section for details on each structure and its members OUOUUU YU BINFO IR RIVEL EVENTS PARTITI EVINFO EVSTATUS NFO _BANKSTATUS ONINFO R SMARTT S MARTVAL READDESC HRI LU ESHOLDS ES aru TAVA B Bank status information Daughterboard version information Device info parameters Device status flags Recording directory information Drive information Event information Drive partitioning information Parameters defining read requests SMART thresholds SMART values Various device version strings 22 Chapter 2 Function Reference CHAPTER 2 FUNCTION REFERENCE XLRApiVersion Syntax void XLRApiVersion char versionstring
173. you wish to perform Possible values are gt XLR_BIST_PCI test communications with PCI bus gt XLR_BIST_BUFFER write and then read all 512 MB of RAM checks for bit errors gt XLR_BIST_DISKx x represents the bus number 0 7 This will test all disks present on the specified bus i e master and slave if present gt XLR_BIST_ALL performs complete self test PCI buffer and all disks present on the system Return Value On success this function returns XLR_SUCCESS On failure this function returns XDLR_FAIL Call XLRGetLastError and XLRGetErrorMessage as demonstrated below to find which component s failed the test Diagnostic Error Messages Action Error Message Test of drive that isn t present Invalid command Drive fails self test Drive missing or failing Test of non XF XF2 StreamStor Invalid request for system mode Buffer test failed Device command failed execution PCI test failed Device command failed execution 117 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode Char temp XLR_ERROR_LENGTH xlrReturnCode XLROpen 1 amp xlrDevice xlrReturnCode XLRSelfTest xlrDevice XLR_BIST_DISK5 if xlrReturnCode XLR_SUCCESS xlrError XLRGetLastError XLRGetErrorMessage temp xlr printf s n temp exit 1 H EOY Jy R
174. yte address of the requested data XferLength is the number of bytes requested Return Value On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL 42 CHAPTER 2 FUNCTION REFERENCE Usage SSHANDLE xlrDevice XLR_RETURN_CODE xlrReturnCode ULONG myBuffer 40000 xlrReturnCode XLROpen 1 amp xlrDevice Fill buffer with new data here xlrReturnCode XLREditData xlrDevice myBuffer 0 OxFE120000 sizeof myBuffer See Also XLREdit XLRSetBankMode and XLRSelectBank 43 CHAPTER 2 FUNCTION REFERENCE XLRErase Syntax T XLR_RETURN_CODE XLRErase SSHANDLE xlrDevice Description XLRErase erases data on the drives E SS_OWMODE mode If the StreamStor is in bank mode this command will erase only the selected bank If the StreamStor is partitioned the command will erase only the data within the currently selected partition Other partitions will be unaffected An exception to this is XLRErase called with the SS_OVERWRITE_PARTITION option When called with this option all partitions will be deleted from the device or from the currently selected bank if in bank mode Parameters e xlrDevice is the device handle returned from a previous call to XLROpen e mode is the erase mode There are five erase modes gt SS_OVERWRITE_NONE sets the dir
175. ze the delay you can call XLRSetOption to set the SS_OPT_PLAYARM option preparations for is called Parametets 6 xlrDevice Return Value is the device handle returned from a previous call to XLROpen On success this function returns XLR_SUCCESS On failure this function returns XLR_FAIL Usage Example sh SSHANDLE XLR_RETURN_COD Set up cha owing how to arm the StreamStor for playback xlrDevice xlrStatus Ct XLROpen 1 amp xlrDevice nnel for playback Arm the playback trigger xlrStatus X Since SS_O LRSetOption xlrDevice SS_OPT_PLAYARM PT_PLAYARM has been set this call to XLRPlayback will not cause the data to flow yet xlrStatus X LRPlayback xlrDevice 0 0 If we do not sleep here then the playback will work as it does ordinarily If instead we sleep the internal playback buffer will fill up This should take no longer than three seconds sleep a llowing playback buffer to fill 93 Setting this option causes the playback to be made but playback does not start until XLRPlayTrigger CHAPTER 2 FUNCTION REFERENCE The playback buffer should now be full Start the data flowing out of the buffer xlrStatus XLRPlayTrigger xlrDevice playback the desired length of time Stop the playback XLRStop xlrDevice See Also

Download Pdf Manuals

image

Related Search

Related Contents

Bosch GHO 40-82 C  Bedienungsanleitung Istruzioni per l'uso Blu-ray-Disc  HQd Portable Meter User Manual    XT385 Treadmill Owner`s Manual  Kensington K62813US wrist rest  KX IRDA 56000 Manuel d`installation PC  

Copyright © All rights reserved.
Failed to retrieve file