Reading the binary data from a http request received via socket connection.

1. I require to extract the binary data out of a http multipart request,
2. I have a server socket opened up, which can receive connections over tcp( and therefore http.)
3. I will require to read the stream, find out the "request boundary identifier", and then extract the different "request body parts".
4. From there i need to read all of the binary content and put it in a file.
5. I did some implementation to his effect. but i see that the file that i had uploaded initially if its not a text file, gets corrupted.
can you please let me know why is that happening, and a probable solution approach.
please find below the class (with a main method) I have been using to expose a server socket.
package self.services;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
public class FileServer {
     public static void main(String[] args) throws Exception {
          ServerSocket serverSocket = new ServerSocket(9999);
          String FOLDER_NAME = "uploaded_files";
          while(true) {     
               try{
                    Socket socket = serverSocket.accept();
                    InputStream is = socket.getInputStream();
                    ByteArrayOutputStream baos = new ByteArrayOutputStream();
                    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
                    String currentLine;
                    int cnt = 0;
                    boolean postRequest = false;
                    String dataBoundary = null;
                    String fileName = null;
                    String yourName = null;
                    while((currentLine = reader.readLine()) != null) {
                         if(currentLine.contains("POST")) {
                              postRequest = true;
                              System.out.println("POST REQ AS EXPECTED VERY NICE");
                              continue;
                         if(!postRequest) {
                              System.out.println("NO POST REQ THIS BREAKING FLOW");
                              break;
                         } else {
                              if(currentLine.contains("Content-Type: multipart/form-data; boundary=")) {
                                   System.out.println("found a boundary value header");
                                   dataBoundary = currentLine.substring((currentLine.indexOf("boundary=") + "boundary=".length()), (currentLine.length() -1));
                                   System.out.println("boundary value = ".concat(dataBoundary));
                                   continue;
                              if(dataBoundary != null && currentLine.contains(dataBoundary)) {
                                   cnt++;
                              if(cnt == 1) {
                                   //move 3 lines
                                   if(currentLine.contains("Content-Disposition: form-data; name=\"yourName\"")){
                                        reader.readLine();//skip a line
                                   System.out.println("Your name = ".concat(yourName = reader.readLine()));
                                   continue;
                              } else if(cnt == 2) {
                                   if(currentLine.contains("Content-Disposition: form-data; name=\"sentFile\"; filename=\"")){
                                        fileName = currentLine.substring(currentLine.indexOf("filename=") + "filename=".length() + 1, currentLine.length() - 1);
                                        System.out.println("File Name = ".concat(fileName));
                                        reader.readLine();//skip a line , this would depict a content type header
                                        reader.readLine();//skip a line, this would indicate a blank line to mark the start of data.
                                        continue;
                                   } else {
                                        // write the content to os
                                        if(currentLine != null && !currentLine.contains(dataBoundary)) {
                                             baos.write(currentLine.concat("\r").getBytes());
                              } else if( cnt == 3) {
                                   System.out.println(("cnt [" + cnt).concat( "], current line [").concat(currentLine).concat("]"));
                                   break;
                    if(fileName == null ||yourName == null) {
                         System.out.println("FileServer.main() dont bother about this" );
                    } else {
                         //send a response back
                         PrintWriter pw = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));
                         pw.write(responseMessage(yourName, fileName));
                         pw.flush();
                         //close output stream
                         pw.close();
                         //handle the request bytearray.
                         FileOutputStream fos = new FileOutputStream(FOLDER_NAME + "/" + fileName);
                         fos.write(baos.toByteArray(), 0, baos.toByteArray().length - 1);
                         fos.close();
                    //close input stream
                    reader.close();
                    socket.close();
                    baos.close();
               } catch(Exception ex) {
                    ex.printStackTrace();
     public static String responseMessage(String yourName, String fileName) {
          String response =
               "<HTML>" .concat(
               "<BODY>") .concat(
               "<P>" ).concat(
               "Mr. <FONT color=\"red\">") .concat( yourName).concat("</FONT>. Your file named <B>").concat( fileName).concat( "</B> successfully reached us." ).concat(
               "</P>") .concat(
               "</BODY>").concat(
               "</HTML>");
          return response;
}{code}
Here is a sample html file which can be used to send multipart requests to the java service.
<html>
     <body>
          <form action="http://localhost:9999" enctype="multipart/form-data" method="POST">
               Enter name :<br/>
               <input type="text" name="yourName"/>
               Enter file :<br/>
               <input type="file" name="sentFile"/>
               <br/>
               <input type="submit" value="Submit"/>
          </form>
     </body>
</html>
*Both the form elements are mandatory*
*I hope my requirement is clear. Any help regarding this will be highly appreciated.*
Regards.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

MishraC wrote:
1. I require to extract the binary data out of a http multipart request,
2. I have a server socket opened up, which can receive connections over tcp( and therefore http.)
3. I will require to read the stream, find out the "request boundary identifier", and then extract the different "request body parts".
4. From there i need to read all of the binary content and put it in a file.
5. I did some implementation to his effect. but
i see that the file that i had uploaded initially if its not a text file, gets corrupted.
can you please let me know why is that happening,Because you are using a Reader (which translates bytes to chars according to the charset encoding specified).
and a probable solution approach. Use a BufferedInputStream.

Similar Messages

  • Capture data from a http request

    i am really new learning abap and i just playing around so i looking a way for capture data from a http request giving the request value and submit for respont something like :
    put the url "http://www.imdb.com/find?s=all&q=" in some way and way for the data to request by the user
    val = 'user_entry'
    result =(any_Function)http://www.imdb.com/find?s=all&q=val
    write / result.
    pd: sorry for my bad english

    Welcome to SDN.
    If you are saying that you want to read some request from the HTTP page,then you have to do it with BSP instead of ABAP.
    Check this link for BSP.
    /message/1688265#1688265 [original link is broken]
    Regards,
    Amit
    Reward all helpful replies.

  • How can I read the trace data from Agilent(HP​)8510C in C++ using NI488.2 and PCI-GPIB ?

    Hello! I am trying to develop an application in C++ for measurements with Agilent(HP) 8510C network analyser using NI488.2 and National Instrument's PCI-GPIB card. In HPBASIC the trace data is read using OUTPDATA command which contains PREAMBLE, SIZE and then the data string in real and imaginary pair for the required points. The ibrd function gives data only for one point. Kindly guide me how I can read the whole trace and and separate out the real and imaginary data values. Regards, kapil

    Hey Kapil,
    It seems that in HPBASIC you were using an instrument driver for the 8510C. OUTPDATA is not a native HPBASIC function. National Instrument has similar instrument drivers for LabVIEW and CVI.
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d8777862​56436006ec498/7b235254f3881ddb862568ab005fbd2e?Ope​nDocument
    http://zone.ni.com/idnet97.nsf/9b2b33e1993d8777862​56436006ec498/24ca7db880ab78ae862568ab005fbc0f?Ope​nDocument
    For example in the CVI instrument driver you will find a source file called hp8510.c. In the source code you will find a function called hp8510c_dataInRaw that sounds similar to the function that you described.
    Note that this example is designed for CVI, but it is possible that you could extract the information you need for C++. If
    you had a copy of CVI you could just add the files downloaded from the instrument driver to a project and then compile and run the project. It already contains a ready to run example that allows you to capture data and use your instrument.
    If you want try CVI you can download an evaluation copy on-line at http://ni.com/lwcvi/launch.htm.
    I hope this helps out,
    JoshuaP
    National Instruments

  • How could we read the XML data from a table using BODS.

    Hi Guys,
    My requirement is , As the OLTP system  consists of a table called person which consists of a column demographics. so how could i read this XML data which is in one column of an SQL table called persons. As this XML data will populate the remaining fields in my target using BODS.
    Regards,
    Amjad.

    Hi Amjad,
    I am afraid there ain't any direct method to extract XML field from a data base.
    Indirect way could be converting the whole table (instead of one field) into XML format and then extract one field from it!!
    Regards,
    Mubashir Hussain

  • How to read the hierarchy data from the same table using loop in AMDP method

    Hi All,
    We have a requirement to get the top partner from BUT050 table.
    Here the Top parent is nothing but the top most in the hierarchy of the partners from BUT050.
    Example:
    For partner 1234 (BUT050-PARTNER1) there is partner 3523(BUT050-PARTNER2) one level above
    For partner 3523(BUT050-PARTNER1)  there is partner 4544 (BUT050-PARTNER2) last level .
    so in this case for the partner 1234 the Top parent is 4544 .
    I have created AMDP Procedure method to get the top-parnet and below given is the logic implemented in AMDP method.
    Here i have implemented a recursive logic with the WHILE loop to get the top most hierarchy partner from the same table BUT050
    IV_Parent is the input partner and ev_top_parent is the output value.
    AMDP Procedure Method:
        DECLARE lv_date VARCHAR(8) := TO_VARCHAR (current_date, 'YYYYMMDD');
        DECLARE found INT := 1;
              iv_partner1 =  SELECT partner1 FROM but050
                              WHERE partner2 = iv_partner
                              AND reltyp = :iv_hierarchy
                              AND date_to >=  :lv_date
                              AND date_from <= :lv_date;
         WHILE found <> 0  do
           select partner1 into ev_top_parent from :iv_partner1;
                           iv_partner1 =  SELECT partner1 FROM but050
                           WHERE partner2 in ( select partner1 from :iv_partner1 where partner1 is not null)
                           AND reltyp = 'ZBP004'
                           AND date_to >= :lv_date
                           AND date_from <= :lv_date;
           select COUNT ( partner1 ) INTO found FROM :IV_PARTNER1;
        END WHILE;
    This method is working fine, but here it is only taking one single partner and getting the top parent as output.
    Now i would like to convert this mehtod so as to accept n number of partners (not one single partner) as input and should process each partner to get the top parent.
    Could anyone guide me how can i handle the given AMDP method further so as to work some how it is within another loop from other AMDP method.
    Thanks.
    Regards,
    Laxman.P

    Hi
    Go to SE11 and enter the hierarchy table name.
    /BIC/H....(infoobject name)...and execute the table and select table entry and delete all....
    Thanks
    TG

  • Alternative manner against subquery to read the first date from a table

    Hi,
    in order to improve the query performance, f.e. is it possible to re-write this query with a subquery:
    SELECT OrderId, Customerid,
    (SELECT TOP 1 Address
    FROM Customers
    WHERE CustomerId = Orders.CustomerId and Effective_Begin_Date <= Orders.OrderDate
    ORDER BY Effective_Begin_Date desc) as CustomerAddress
    FROM Orders
    by using a Join?
    Many thanks
    P.S.: this is an example and not a real working case.

    To be honest, I think you'd better be served with a view that calculated the begin and end date for a customers address, and then used that to join to in your queries.
    DECLARE @orders TABLE (orderID INT IDENTITY, customerID INT, orderDate DATE)
    DECLARE @customers TABLE (customerID INT, address INT, effective_Begin_Date DATE)
    INSERT INTO @customers (customerID, address, effective_Begin_Date) VALUES (1, 1, '2015-01-01'),(2, 2, '2015-02-01'),(3, 3, '2015-02-02'), (1, 4, '2015-02-01')
    INSERT INTO @orders (customerID, orderDate) VALUES (1, '2015-01-01'),(2, '2015-02-01'),(2, '2015-02-01'),(2, '2015-02-02'),(3, '2015-01-01'),(3, '2015-02-02'),(1, '2015-02-05')
    ;WITH customerAddress AS (
    SELECT c1.customerID, c1.effective_Begin_Date, DATEADD(DAY,-1,c2.effective_Begin_Date) AS effective_End_Date, c1.address
    FROM @customers c1
    LEFT OUTER JOIN @customers c2
    ON c1.customerID = c2.customerID
    AND c2.effective_Begin_Date = (SELECT MIN(effective_Begin_Date) FROM @customers WHERE customerID = c1.customerID and effective_Begin_Date > c1.effective_Begin_Date)
    SELECT orderID, c1.customerID, ca.address, ' ', *
    FROM @customers c1
    INNER JOIN customerAddress ca
    ON c1.customerID = ca.customerID
    AND c1.address = ca.address
    LEFT OUTER JOIN @orders o
    ON c1.customerID = o.customerID
    AND o.orderDate BETWEEN ca.effective_Begin_Date AND COALESCE(ca.effective_End_Date,CURRENT_TIMESTAMP)
    ORDER BY c1.customerID, o.orderID
    SELECT OrderId, Customerid,
    (SELECT TOP 1 Address
    FROM @Customers
    WHERE CustomerId = o.CustomerId
    AND Effective_Begin_Date <= o.OrderDate
    ORDER BY Effective_Begin_Date desc) AS CustomerAddress
    FROM @Orders o
    I've mocked up your customer and order tables here, and used a CTE in place of a view. There's a couple of reasons to go this route, but the primary one is once the view is created you have one object thats controling the logic - one place to troubleshoot,
    one place to change. 

  • Parsing the return value from a http request into a xml document?

    suppose a url "http;//abc.com/index.asp" that return a string like this:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <bbsend>
    <title>xml testing</title>
    - <record>
    <sender>111111</sender>
    <date>2004-01-05 04:11:44</date>
    <message>yes!</message>
    </record>
    - <record>
    <sender>22222222</sender>
    <date>2004-01-14 01:06:31</date>
    <message>A</message>
    </record>
    </bbsend>
    how can i parsing this return value into a xml document???
    i try something like this:
    URL url = new URL("http://abc.com/index.asp");
    HttpURLConnection http = (HttpURLConnection)url.openConnection();
    DataInputStream in = new DataInputStream(http.getInputStream());               
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    document = builder.parse(in);
    System.out.println(document.getNodeValue());
    But fail , can anyone help

    do u mean get the xml content??
    i am doing a project with BBSend
    [email protected]

  • How can I read the serial data from my mouse on com 1?

    I just started using LABView so please have patience with me!
    An error message says the resource is valid but VISA can not open a session with the device, in this case a Roller ball cannected to the comm port. Obviously windows is already using this device, I don't want to over ride it just monitor it.

    If you are using LV 7 the attached VI demonstates how to use the new functions that are now included with LV.
    I just stumbled across these earlier today and they worked right out of the box.
    Have fun,
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    mouse_position.vi ‏90 KB

  • Extract the Attachment data from Adobe Reader 8

    Hi,
      We have a requirement to read the attachment data from adobe pdf. We are designing the PDF's in Adobe Live Cycle Designer ES. From the discussion i understand we can get the name and size of the attachment using dataobjects. But i need the content of the attachment. Let me know if there is any code to extract the attachment data.
    Thanks in advance.

    You can read the contents of an attached file using the doc.getDataObjectContents method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.475.html
    You'll just have to parse the contents correctly using JavaScript.

  • Application to Read and Write the Configuration Data from a xml file

    Hi,
    I have to develop a Webdynpro application that will do the following:
    Read the Configuration data from an xml file
    If stored in a file , and the file is not found, prompt the user to provide the file location.
    Pre-Populate the screen(table) with the configuration data
    Allow the user to edit the data
    Store the configuration data when the user hits the Save button
    The config xml file details are as follows:
    Regardless of the location of the configuration data, the following fields will be stored
    Application (string) will always contain u201CSFA_EDOCSu201D
    Key (string) eg LDAP_USER, DB_PREFIX, etc.
    Type (character)  u201CPu201D = Plain Text, u201CEu201D = Encrypted
    Value (string)
    Since I am new to WD, I would require help on this.
    Please help.Its Urgent.
    Regards,
    Vaishali.
    Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AM

    Hi,
    I have to develop a Webdynpro application that will do the following:
    Read the Configuration data from an xml file
    If stored in a file , and the file is not found, prompt the user to provide the file location.
    Pre-Populate the screen(table) with the configuration data
    Allow the user to edit the data
    Store the configuration data when the user hits the Save button
    The config xml file details are as follows:
    Regardless of the location of the configuration data, the following fields will be stored
    Application (string) will always contain u201CSFA_EDOCSu201D
    Key (string) eg LDAP_USER, DB_PREFIX, etc.
    Type (character)  u201CPu201D = Plain Text, u201CEu201D = Encrypted
    Value (string)
    Since I am new to WD, I would require help on this.
    Please help.Its Urgent.
    Regards,
    Vaishali.
    Edited by: vaishali dhayalan on Sep 19, 2008 8:29 AM

  • Java API to read the Encrypted Values from Windows Registry settings

    Is there any Java API to read the Encrypted Values from Windows Registry settings ?
    My Java Application invokes a 3rd party Tool that writes the key/value to windows registry settings under : “HKLM\Software\<3rdparty>\dataValue”.
    This entry is in BINARY and encrypted with 3DES, using crypto API from Microsoft.
    3rd party software to encrypt the data stored in registry it
    either uses C++ code: and uses the call “CryptProtectData” and “CryptUnProtectData” or
    If it is a .NET (C#) it uses the call “Protect” or “UnProtect” from class “ProtectData” of WinCrypt.h from the library “Crypt32.lib.
    Note: The data is encrypted using auto-generated machinekey and there is no public key shared to decrypt the Encrypted data.
    Since the data is encrypted using auto-generated machinekey the same can be decrypted from a .Net / C++ application using CryptUnprotectData or UnProtect() API of WinCrypt.h from the library “Crypt32.lib.
    To know more about Auto-Generated MachineKey in Windows refer the links below
    http://aspnetresources.com/tools/machineKey
    http://msdn.microsoft.com/en-us/library/ms998288.aspx
    I need to find a way in Java to find the equivalent API to decrypt (CryptUnprotectData) and Microsoft will automatically use the correct key.
    But i couldn't find any informato related to Java APIs to enrypt or decrypt data using auto-generated machinekey.
    Is there a way to read the encrypted data from Windows regsitry settings that is encrypted using the Auto-Generated Machine Key ?
    Kindly let me know if Java provides any such API or mechanism for this.

    If the symmetric key is "auto-generated" and is not being stored anywhere on the machine, it implies that the key is being regenerated based on known values on the machine. This is the same principle in generating 3DES keys using PBE (password-based-encryption). I would review the documentation on the C# side, figure out the algorithm or "seed" values being used by the algorithm, and then attempt to use the JCE to derive the 3DES key using PBE; you will need to provide the known values as parameters to the PBE key-generation function in JCE. Once derived, it can be used to decrypt the ciphertext from the Regiistry in exactly the same way as the CAPI/CNG framework.
    An alternate way for Java to use this key, is to write a JNI library that will call the native Windows code to do the decryption; then the Java program does not need to know details about the key.
    That said, there is a risk that if your code can derive the key based on known seeds, then so can an attacker. I don't know what your applicatiion is doing, but if this is anything related to compliance for some data-security regulation like PCI-DSS, then you will fail the audit (for being unable to prove you have adequate controls on the symmetric key) if a knowledgable QSA probes this design.
    Arshad Noor
    StrongAuth, Inc.

  • How to read a byte data from maxdb data base

    Dear All,
    I have a issue in reading the data from database table.
    I have a column named as templateData which contains the byte data (biometric template data, which comes from fingerprint device) which is DataType of LONG and CODE of BYTE.
    I am not using the below to get the template data
    Connection con = null;
      Statement stmt = null;
      ResultSet resultSet = null;
    byte[] DbBioData = new byte[1024];
    InitialContext ctx = new InitialContext();
       if(ctx == null)
         throw new Exception("Boom - No Context");
       DataSource ds = (DataSource)ctx.lookup(db_drvstr);
       con = ds.getConnection();
       stmt = con.createStatement();
       resultSet  = stmt.executeQuery(db_query + " where SUBJECT_ID='"+ username +"'");
       if(resultSet.next())
        DbBioData = resultSet.getBytes(1);
        _loc.infoT("verify", "verify::Got BioData From MAXDB" +DbBioData );
        loc.infoT("verify", "verify::Query is: " +dbquery + " where SUBJECT_ID='"+ username +"'" );
    But I am not getting the proper data, could anyone please tell me the way to read the biometric data from data base table.

    Hi Kishore,
    is it me or is there no query definition in that code?
    I see that you concatenate a "db_query" with a string to make up a WHERE clause, but the db_query is nowhere defined before.
    So at least you should provide something like
    stmt = con.createStatement("SELECT templateDate FROM <tablename> ");
    before you do anything with the query.
    Besides this: have you ever heard of SQL injections? Try to use BIND-variables instead of concatenating strings. Otherwise your application will spend much time just with parsing your queries...
    Hmm... possibly the best thing you could do about this is to read the JAVA manual for MaxDB:
    <a href="http://maxdb.sap.com/currentdoc/ef/2de883d47a3840ac4ebb0b65a599e5/content.htm">Java Manual (SAP Library - Interfaces)</a>
    Best regards,
    Lars
    Edited by: Lars Breddemann on Dec 17, 2007 1:12 PM - corrected link

  • SAP DMS: Read document binary data stored in a 3rd party repository

    Hi,
    I'm totally new regarding SAP DMS and I'm a bit confused about what can or can't do, so maybe the question will be quite generic and unclear.
    The scenario in my company is that we have multiple repository servers where we store our documents. When a document is created or modified in one of these repositories a new record is also created/modified in SAP DMS, but this DMS entry only contains the basic metadata information and a URL link to the document, not the content. When the user is in SAP DMS, the only way to access the document content, is via the link that will open the browser outside of SAP GUI and access the repository data using the laptop credentials.
    I would like to know if DMS provides some kind of interface to be able to access the document content from SAP. Now we only have this unidirectional interface from the repository that creates the record in DMS with the metadata but there is nothing to retrieve the content.
    Our main purpose is that we want to download all the files linked to a user (we have a logic to determine if a DMS file is linked to a user). The content of these files may be stored in different content repositories. So I would like to read the binary data in SAP from the different repositories and then be able to download it.
    Thank you in advance for your help.
    - Marçal

    Hi Sagar,
    This FM can't work since there is nothing configured in SAP to access to the file content. The DMS record only has a URL pointing to it.
    Actually what I want to know is what do I have to configure in SAP in order to be able to use a FM like the one you mentioned.

  • Error while reading the analog data?

    Hi,
    I was trying to read the analog data from 4 voltage channels with -5,+5 voltages as minmum  and maximum values.Iwas using 250khz as sampling rate and 2seconds as duration.When I try to read the analog data using DAQmxReadBinaryU16 method.I was getting the following error :
    ADC conversion attempted before the prior conversion was completed.Increase the period between ADC conversions.I f you are using external clock check your signal for the presence of  noise or glitches.Task Name _unnamed Task<0>.Status C.
    I would appriciate if you could do this needful.
    Thanks In Advance,
    Meka

    Meka,
    The M Series devices have a specified maximum sampling rate for a single channel.  Past a single channel, the maximum sampling rate is then divided down depending on the number of channels sampled.  The reason for this is because each M Series device has one analog-to-digital converter (ADC).  Every channel in a scan list must pass its data through this one ADC. To allow for this, the M Series devices also have a multiplexer (MUX).  Because of settling time limitations with the MUX switching, the maximum sampling rate is the specified single channel sampling rate divided by the number of channels be scanned.  In your case, because you are using 4 channels, the maximum sampling rate you can achieve with the 6221 is:
    250 KS/s / 4 = 62.5 KS/s
    If you need a sampling rate of 250 KS/s for each channel, you may be interested in our S-Series devices.  These devices have a separate ADC for each channel, allowing all analog channels to run at the maximum sampling rate simultaneously.  Take a look at the PCI-6143, which can sample at 250 KS/s on all of its 8 channels at the same time.
    I hope this helps!
    Justin M
    National Instruments

  • How to get the current data and time of SCOM server via SCOM SDK (API) calls?

    Hi,
    I need to read the current date and time of SCOM server via SOM SDK.
    Is there a class in SDK that provides this info ?
    Thanks,
    satheesh

    To get time and date of Alerts of SCOM, You can use following command let "get-scomalert"
    Also, You can refer below links
    http://blog.tyang.org/2013/02/21/using-scom-2012-sdk-to-retrieve-resource-pools-information/
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

Maybe you are looking for