How to specify in TS unsigned long? unsigned short?

Hi,
I'm lusing a c/c++ step type from TestStand.
I need to use a structure whose fields according to the h file of the dll are:
unsigned char
unsigned long
unsigned short
Now, when I define a container in TestStand (to interface with the dll structure) my options are:
integer
unsigned integer
etc...
What am I supposed to do ?  what is the appropriate numeric format? 
Thanks

Hi Doug,
I'm given the dll and load of h files.  The definitions you mentioned are not shown...
Suppose I want to creat in TS a container to match variable FCPortConfig.  This variable structure is given here....
typedef struct tagFCPortConfig
 unsigned char  ucTopology;    /* For Point-To-Point use TOPOLOGY_PT_2_PT
              and for LOOP Topology use TOPOLOGY_LOOP */
 unsigned char  ucSpeed;     /* SPEED_1GHZ, SPEED_2GHZ       */
 unsigned char  ucDisableTimer;  /* (Not Currently Used) enable or disable
              timeout timer          */
 unsigned long  ulRRDYGap;    /* (Not Currently Used) up to a 27-bit val */
 unsigned long  ulRRDYGapRandomEnable;/* (Not Currently Used)enable/disable   */
 unsigned long  ulRRDYGapSeed;   /* (Not Currently Used) If random set;
              a 27-bit val          */
 unsigned long  ulRRDYGapMin;   /* (Not Currently Used) If random set;
              a 27-bit val          */
 unsigned long  ulRRDYGapMax;   /* (Not Currently Used) If random set;
              a 27-bit val          */
 unsigned char  ucAutoNegotiate;  /* (Not Currently Used) enable or disable
              auto negotiation         */
 unsigned short uiBBCreditConfigRx; /* BB_credit this port will advertise   */
 unsigned char  ucStatsMode;   /* Determines weather or not to retrieve
                                          the extended stats counters, use
                                          STATS_MODE_NORMAL & STATS_MODE_EXTENDED */
 unsigned char  ucReserved[15];  /* Reserved */
} FCPortConfig;
1) Is there a way to find out how they define unsigned char, unsigned short and unsigned long?
2) Can I still use the TS default numeric type?
Thanks
Rafi

Similar Messages

  • How to map C/C++ unsigned char[] to Java

    hi all,
    I'm using w2k OS.
    Given that C code:
    BYTE *fBuf;
    fBuf = new BYTE[256];
    Is there anyone of you know how to pass/map the unsigned char to java?
    regards
    elvis

    why did you classify this as byte? how do you did
    that?They probably guessed. It is probably a good guess.
    You can use the following to determine the size exactly.
    First determine what "BYTE" is exactly. You will have to find that in an include file somewhere. Your IDE might do this for you automatically.
    So, for example you might find the following...
    typedef unsigned char BYTE;
    So then you would know that the type is actually "unsigned char".
    Once you have this information you then look in limits.h (this is an ANSI C/C++ file so it will exist somewhere.) In it you find the "..._BIT" that corresponds to the type. For the type given above you would be looking for "CHAR_BIT" (because unsigned and signed chars are the same size.)
    On my system that would be...
    #define CHAR_BIT 8
    That tells you that there are 8 bits in the BYTE value. So now you need to find a java type that also has at least 8 bits. And the java "byte" value does.

  • Numbers to CSV export script: how to specify the encoding?

    Hi,
    I'm using the following script to export a Numbers document to CSV:
    # Command-line tool to convert an iWork '09 Numbers
    # document to CSV.
    # Parameters:
    # - input: Numbers input file
    # - output: CSV output file
    # Attik System, Philippe Lang
    # Creation date: 31 mai 2012
    # Modification date:
    on run argv
      # We retreive the path of the script
              set myPath to (path to me)
              tell application "Finder" to set myFolder to folder of myPath
      # We get the command line parameters
              set input_file to item 1 of argv
              set output_file to item 2 of argv
      # We retreive the extension of the file
              set theInfo to (info for (input_file))
              set extname to name extension of (theInfo)
      # Paths
              set input_file_path to (myFolder as text) & input_file
              set output_file_path to (myFolder as text) & output_file
              if extname is equal to "numbers" then
        tell application "Numbers"
          open input_file_path
          save document 1 as "LSDocumentTypeCSV" in output_file_path
          close every window saving no
        end tell
              end if
    end run
    It works fine, except that I don't know how to specify the encoding of the text in the CSV file (Latin1, MacRoman, Unicode). This option is available in the export dialog of Numbers. Any hint on how to do that is welcome. (GUI Scripting?)
    Where can I find documentation on the iWork "vocabulary" available? Is there a definitive documentation somewhere? I tried to record an manual export in the script editor, without success. Script is more or less empty.
    Thanks!
    Philippe Lang

    A further note from Yvan. He's made some revisions to the script sent earlier.
    --{code}
    --[SCRIPT export to CSV with selected encoding]
    I added some features.
    (1) Defining the encoding thru the preferences file apply only if
    the application is not in use because the file is read only once in a session.
    A test urge you to quit Numbers if it is running.
    (2) info for is deprecated so it may be removed by Apple tomorrow.
    I no longer use it.
    (3) just for the fun, I added a piece of code allowing you to select the encoding on the fly.
    Thanks to the property chooseEncodingInScript, at this time the script use Unicode (UTF-8)
    (4) I'm wondering which tool is used to launch this script,
    I don't know the way to pass arguments when I run one.
    Yvan KOENIG (VALLAURIS, France)
    2012/06/13
    property chooseEncodingInScript : false
    true = the script will ask you to select the encoding
    false = the script use the embedded encoding
    on run argv
      set input_file to (item 1 of argv) as text
      set output_file to (item 2 of argv) as text
      set myPath to (path to me) as text
              tell application "System Events"
      set theProcesses to name of every application process
      set myFolder to path of container of (disk item myPath)
      set input_file_path to myFolder & input_file
      set output_file_path to myFolder & output_file
      set extname to name extension of (disk item input_file)
      end tell
              if extname is "numbers" then
                        if "Numbers" is in theProcesses then error "Please, quit “Numbers” before running this script !"
      if chooseEncodingInScript then
                                  set theList to {"Mac OS Roman", "Unicode (UTF-8)", "Windows Latin 1"}
                                  set maybe to choose from list theList with prompt "Choose the default encoding applying to export as CSV"
      if maybe is false then
      error number -128
      else if item 1 of maybe is item 1 of theList then
                                            30 -- Mac OS Roman
      else if item 1 of maybe is item 2 of theList then
                                            4 -- Unicode (UTF-8)
      else
                                            12 -- Windows Latin 1
      end if
      else
                                  4 -- Unicode (UTF-8)
      end if
                        do shell script "defaults write com.apple.iWork.Numbers CSVExportEncoding  -int " & result
      tell application "Numbers"
      open input_file_path
                                  save document 1 as "LSDocumentTypeCSV" in output_file_path
      close every window saving no
      end tell
      end if
    end run
    --{code}
    Regards,
    Barry

  • How to specify PACKAGE SIZE for to RFC_READ_TABLE from PyRFC?

    I'm trying to use PyRFC to extract large tables via RFC_READ_TABLE (due to an uncooperative/unsupportive basis team).
    I know that RFC_READ_TABLE supports calling it with PACKAGE SIZE since ERPConnect does it by default.
    In Python for Basis (Part 1), I learned how to specify an Open SQL where clause using the OPTIONS:
    result = connector.call('RFC_READ_TABLE',
                           QUERY_TABLE=tablename,
                           DELIMITER=delimiter,
                           OPTIONS = [{'TEXT':where_clause}])
    Is there a way, and how to specify PACKAGE SIZE in this case?
    Thanks

    Hi,
    the package size works, but you need to call the function module multiple times in a loop. Here's an excerpt of the attached script:
    recordcounter = 1          #needs to be >0 to get the while loop going
    iteration = 0              #the number of times the function module got called
    while recordcounter > 0:  #as long as the function module calll returns rows...
        tempresult = self.call('RFC_READ_TABLE',             
                                ROWSKIPS=iteration*fetchsize,  #defines the number of rows to skip
                                **parameters)
        iteration=iteration+1  #increase the iteration
        data = tempresult['DATA']    #assign the returned rows to a variable
        if len(data) > 0:      #have there been any rows?
            for row in data:      #Do something with them
        else:
            recordcounter=0    #set recordcounter to 0 to end the while loop.
    The script is far away from being perfect. It doesn't deal with RAW fields and the data types it returns are all strings. It does what I needed it to do but it may not be sufficient for what you may be trying to achieve.
    Best regards
    Lars

  • How to specify which of 2 wifi cards to use

    Hi All,
    I recently installed Arch Linux on a USB (not live, a persistant installation). I have 2 wifi cards: one that came with the laptop and is used via PCIe, which is an Intel Centrino Wireless-N 2200. It's awful. The other, which is a USB wifi card and which I want to use, is an ASUS USB-N10. I checked linux-wless.passys.nl to see if the N10 was supported, and it said it was, and also said: "Supported by the rtl8192su and r8712u staging drivers in the mainline Linux kernel. Firmware from userspace is required." I can't get wifi working properly in Arch Linux, which makes it impossible to progress because I can't install anything and am stuck in just using terminal. I don't know how to specify which card to use in Arch. Any help would be much appreciated.
    Thank you for your answers in advance!

    After running ip addr, it doesn't display names for the different devices in a way that I can tell which ones they are. The names that it gave me are: "lo", "enp3s0", "wlp4s0", and "wlp0s20u2". I know that 2 of those are virtual ports for wireless devices that aren't being used, but I don't know how to differentiate.
    EDIT: Also, when I try to navigate to etc/netctl/examples/wireless-wpa, it says "Correcting wireless-wpa to ."
    EDIT 2: "lo" seems to be a generic interface, and I've narrowed down the names so now I know that my two wireless cards are 'wlp4s0" and "wlp0s20u2". When I ran iwconfig, I got
    wlp4s0 IEEE 802.11bgn ESSID:off/any
    Mode:Managed Access Point: Not-Associated Tx-Power=15dBm
    Retry long limit:7 RTS thr:off Fragment thr:off
    Encryption key: off
    Power Management: off
    wlp0s20u2 unassociated Nickname:"rtl_wifi"
    Mode:Auto Access Point: Not-Associated Sensitivity: 0/0
    Retry:of RTS thr:off Fragment thr:off
    Encryption key:off
    Power Management:off
    Link Quality:0 Signal level:0 Noise level:0
    Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
    Tx excessive retries:0 Invalid misc:0 Missed beacon:0
    lo no wireless exentions
    enp3s0 no wireless extensions
    I'm assuming that this means that the latter two interfaces are the unused virtual interfaces. Does this tell you anything important?
    Last edited by TheAtomicGoose (2014-04-07 21:05:28)

  • Converting doubles to unsigned shorts for grayscale BufferedImages

    I'm generating a slightly random array of doubles for use in defining pixel shades in grayscale BufferedImages, so I need to cast each double into a short so that my future DataBuffer can treat them as unsigned shorts. Right now the double values greater than 2^15 are becoming negative when casted, so how do I store it as unsigned?

    Thanks for the reply DrLaszloJamf. I need a Gaussian distribution of pixel shades, and the only Gaussian distribution generation functions I can find return doubles. Unfortunately I don't have time to write my own function to do the same with short values, but as implied by your second remark, I think the DataBuffer is doing with the shorts what I need it to. Thanks very much also for your answer to another post that showed me how to generate a grayscale BufferedImage using a DataBufferUShort in the first place!

  • In OPEN DATASET Statement Filenames are platform-specific How to specify MS

    In OPEN DATASET Statement
    Filenames are platform-specific. You must therefore use file- and pathnames that conform to the rules of the operating system under which your R/3 System is running. However, you can also use logical filenames to ensure that your programs are not operating system-specific. For further information, refer to Using Platform-Independent Filenames.
    DATA FNAME(60).
    FNAME = '/tmp/myfile'.
    OPEN DATASET 'myfile'.
    OPEN DATASET FNAME.
    This example works as long as your R/3 System is running under UNIX. The program opens the file "myfile" in the directory in which the R/3 System is running, and also opens the file "myfile" in directory "/tmp".
    FNAME = '[TMP]myfile.BIN'
    OPEN DATASET 'myfile.BIN'.
    question]]  How to specify an MS-file & how to go about?

    Hi,
    Just get the input file name from the application server through selection screen and keep it in parameter(p_inpfile).
    Then pass the parameter to OPEN DATASET statement.
    OPEN DATASET p_inpfile FOR INPUT IN TEXT MODE ENCODING DEFAULT.
      IF sy-subrc NE 0.
        WRITE :/ text-004.                                   "'No such input file' COLOR 3.
        EXIT.
      ELSE.
        DO.
          CLEAR : wa_string,wa_0001.
    *Reading the file from application server and moving to work area*
          READ DATASET p_inpfile INTO wa_string.
          IF sy-subrc NE 0.
            EXIT.
          ELSE.
            CLEAR wa_0001.
    *Spliting fields in the file-
            REPLACE ALL OCCURRENCES OF '#' IN wa_string WITH ' '.
            SPLIT wa_string AT c_htab INTO wa_0001-pernr
                                           wa_0001-werks       "Personnel Area
                                           wa_0001-persk       "Employee Sub-Group
                                           wa_0001-vdsk1       "Org. Key
                                           wa_0001-abkrs       "Payroll area
                                           wa_0001-ansvh.      "Work contract
            wa_0001-begda = p_efdate.
            wa_0001-endda = '99991231'.
            APPEND wa_0001 TO int_0001.
          ENDIF.
        ENDDO.
        CLOSE DATASET p_inpfile.
    Use like this and pass all those values to internal table.
    Thanks,
    Sakthi C
    *Rewards if useful*

  • How do I make phone vibrate longer for a text message?

    I have an iphone 4s and I am wondering how I can set the vibrate longer for a text message.  I have it turned on.  I have set the vibrate to "Rapid".
    I vibrates long for a phone call, but I want it to vibrate longer than a short burst, which is repeated later, on a text message.
    Can anyone help?

    You can't.

  • How to specify -preview when launching via AppleScript

    I have an InDesign Server CS5.5.I have a shell script that waits for xml files to be placed into a certain directory on the server. When it sees a file in the folder it launches an applescript that controls InDesign Server. I need to know how to specify the -preview option for the InDesign Server binary so the files generated by the server will have previews when they are opened in InDesign client. The apple scripts look like this:
    tell application "InDesign Server"
         -- do some stuff
    end tell
    Where/how would I specify the -preview option. I see nothing referring to the -preview option in the Library for indesign.

    There's two ways to set it:
    1) in command line when you launch the executable, there's a preview option. I don't remember off hand the exact syntax.
    2) In the script itself (using Javascript syntax -- Applescript would be similar) app.serverSettings.imagePreview = true;
    Harbs

  • My phone doesn't last more than two hours before the battery is dead. Any one know how to make the battery last longer? College student in need of help!

    I used to be able to go all day without charging my phone but now I have to charge it like every two hours and as a college student who also works. I go most of my day with a dead phone. Does anyone know how to make your battery last longer?

    Eight Battery Saving settings for your iPhone and iPad | MacIssues
    The Ultimate Guide to Solving iOS Battery Drain — Scotty Loveless

  • How to specify a variable in the script logic

    I want to pass a variable from the process chain using the prompt statement.
    I  want to refer to the variable name in the script. When I used the following statement in the script file, I got an error when validating the statement below:
    //Increase Wage and Salary & Personnel Exp. by entered percentage
    [P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
    Syntax error:Reference Error: $WS_PERCT$  is not defined
    One of the how-to guides indicated that I should use the dollar sign before and after the variable name.
    Can someone explain how to specify a variable name in the script.
    Thanks.

    Thanks, Pravin.
    I tried using the syntax with the # sign (as shown below) but when I validate the code I get an error. The message indicates there is an issue with $WS_PERCT$.
    Syntax error:Reference Error: $WS_PERCT$ is not defined
    P_ACCT].[#CE0004020] = [P_ACCT].[CE0004020] * ( 1 + $WS_PERCT$ / 100)
    Can you please advise if am missing something here in the code.
    Edited by: Sanjay Kumar on Sep 24, 2009 10:06 PM
    Edited by: Sanjay Kumar on Sep 24, 2009 10:08 PM

  • How to specify  tablespace for a primary key inde in create table statement

    How to specify the tablespace for a primary key index in a create table statement?
    Does the following statement is right?
    CREATE TABLE 'GPS'||TO_CHAR(SYSDATE+1,'YYYYMMDD')
                ("ID" NUMBER(10,0) NOT NULL ENABLE,
                "IP_ADDRESS" VARCHAR2(32 BYTE),
                "EQUIPMENT_ID" VARCHAR2(32 BYTE),
                "PACKET_DT" DATE,
                "PACKET" VARCHAR2(255 BYTE),
                "PACKET_FORMAT" VARCHAR2(32 BYTE),
                "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
                 CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") TABLESPACE "INDEX_DATA"
                 TABLESPACE "SBM_DATA";   Thank you
    Edited by: qkc on 09-Nov-2009 13:42

    As orafad indicated, you'll have to use the USING INDEX clause from the documentation, i.e.
    SQL> ed
    Wrote file afiedt.buf
      1  CREATE TABLE GPS
      2              ("ID" NUMBER(10,0) NOT NULL ENABLE,
      3              "IP_ADDRESS" VARCHAR2(32 BYTE),
      4              "EQUIPMENT_ID" VARCHAR2(32 BYTE),
      5              "PACKET_DT" DATE,
      6              "PACKET" VARCHAR2(255 BYTE),
      7              "PACKET_FORMAT" VARCHAR2(32 BYTE),
      8              "SAVED_TIME" DATE DEFAULT CURRENT_TIMESTAMP,
      9               CONSTRAINT "UDP_LOG_PK" PRIMARY KEY ("ID") USING INDEX TABLESP
    ACE "USERS"
    10               )
    11*              TABLESPACE "USERS"
    SQL> /
    Table created.Justin

  • How to specify a variable in the path prefix of an External HTTP (RFC) connection (in transaction SM59)

    Hi There,
    Please can someone tell me how to specify a variable in the  path prefix of an External HTTP (RFC) connection in transaction SM59?
    For example if my path prefix is /invoke/test/example?input=XYZ; how do I replace "XYZ" with a variable so that I can pass in any value after "=" ?
    Thanks,
    Brendon

    Hi,
    This is SAP Business one system administration forum. Please find correct forum and repost above discussion to get quick assistance.
    Please close this thread here with helpful answer.
    Thanks & Regards,
    Nagarajan

  • How do i remove apps no longer wanted in iTunes?

    How do i remove apps no longer wanted in iTunes?
    trying to clean up old, unwanted apps from itunes on my iMac

    Click on it, then hit the delete key on your keyboard

  • Installation error for iTunes 7.5 on XP: Specified path is too long

    I just downloaded the most recent version of the installer, but every time I run it, I get this message midway through the "Copying new files" step:
    +The specified path is too long:+
    C:WINDOWSwinsxsx86Microsoft.VC80.CRT1fc8b
    3b9a1e18e3b8.0.50727.762_x-ww6b128700
    There's no denying that it's long, but I don't know what I'm supposed to do about that. I mean, I'm not the one who specified the path.
    Clicking Retry just returns the same error endlessly, and clicking Cancel causes the installer to roll back all its changes and close itself.
    What gives?

    What exact version of Windows XP Pro do you have?
    Is it the standard Professional edition, or is ir Professional x64 edition? Check by right-clicking on My Computer and choosing Properties.

Maybe you are looking for

  • Mavericks 10.9.1 won't shutdown or restart

    Just upgraded to 10.9.1 Mavericks. Since upgrading, my MacBook Pro won't shutdown or restart; nothing happens after instigating, then after a few minutes a dialogue box appears saying an open application prevented the action. I have tried to upgrade

  • How change sStart and End Date and time in the Audit log ???

    Install C2S BM39SP1. Work. Go to the: https://bmserver:8009 Open : VPN Monitor | Audit log information. Problem - can not cahnge Date and time in the Audit Log Start(End) How i vcan do this ? How i can get every day stat log: login ; date_time_login

  • Nothing in notification center preferences.

    Right basically I've just upgraded to Mountain Lion. I opened the notification center on the right-hand side of the screen but there was nothing there, so I opened the notification center preferenes and there are no apps listed. I know that not many

  • [SOLVED] Radeon HD 3850 / Radeon open source driver

    Hello, My laptop broke and for some time now I am using my old desktop pc (2008), on which I have arch linux and manjaro, dual booted. My problem is that if I want a long video (over 20 minutes my whole pc is becoming slow and the screen becomes slug

  • Skype crashes when i start it - win 7

    My skype crashes 20 seconds after i open it. Firma con problemas: Nombre del evento de problema: BEX Nombre de la aplicación: Skype.exe Versión de la aplicación: 7.2.60.103 Marca de tiempo de la aplicación: 54eefff4 Nombre del módulo con errores: ltc