How can I capture data between STX and ETX series

I searched this forum and online for what seems like an easy question, but I have not found a good example. I have data of variable length from a serial port and I need to capture the data between the characters STX and ETX. Here's what I have, which returns all the data characters 2 when:

data from Byte [] = {0x02, (byte) 0 x 03 (byte)};

Just read bytes until you get the STX, read data until you get the ETX and sure to properly treat the ESC, which is ignore it and take the next character to what whether, without checking it to ETX or ESC.

Tags: Java

Similar Questions

  • How can I pass data between DIAdem and LabVIEW?

    Hello community,

    in fact I use a LabVIEW application to control a test system, collect data and store it in a file.

    DIAdem is executed (using ITOCommand) and then create a report (PDF).

    This works already.

    But also, I would like to receive a return value of tiara, a real number, as for example the register R1.

    No idea how can be achieved?

    Thank you!

    Espelkamper

    Declare records, variables in the script of tiara that store the calculated result. Read records in labview

  • How can I integrate signals between t0 and T1

    My problem is: I use USB6251 to receive signal Y permanently, including proportional to t dX/d. I have to calculate the X signal in the interval between t0 and t1. I've known who can use integralx (t) to integrate this signal continuously, but I do not know how to calculate this integration in the given interval (t0 and t1).

    Help, please

    I thank in advance.

    Rostov

    What I understand here, you calculate X (the integral of your signal) from the moment you start to acquire until you stop. If you have a continuous signal of data? Can not only cut you the early data prior to t (0) and chop the data beyond t (1), and what remains is the signal X of the t (0) to the t (1).

    By "chop off", I hear using the subset of the table and determine what clues relate to these time points t (0) and t (1).

  • How can I share documents between XP and 7 on the same computer?

    I installed 2 windows xp and a windows 7 on my computer how can I share their documents

    Use one of these guides:

    http://www.howtogeek.com/HOWTO/Windows-7/share-files-and-printers-between-Windows-7-and-XP/

    http://www.TechRepublic.com/blog/window-on-Windows/how-do-i-make-Windows-7-HomeGroup-content-accessible-to-Vista-and-XP/1910

  • How can I stop syncing between iPhone and iPad photos

    Two questions:

    (1) someone can you please give me step by step instructions on how to STOP my iPad photos to appear on my iPhone?

    (2) is there a way to the pictures on each device, go to iCloud, without them appearing on each device?

    Thank you... as you can see... very technologically challenged!

    Your two requests are a bit against intuitive

    iCloud IS a synchronization mechanism - most of the time

    To stop synchronization - settings - Photos - MyPhotoStream - Turn Off

  • How can I change table between char and varchar field

    Hi I need change my column of table of char in varchar2
    SQL> ALTER TABLE CFG_OFFICE
    MODIFY(OFFICECODE VARCHAR2(5 BYTE))
    ALTER TABLE CFG_OFFICE
    MODIFY(OFFICECODE VARCHAR2(5 BYTE))
    Error at line 3
    ORA-02267: column type incompatible with referenced column type
    Published by: adf009 on 08/05/2013 17:18

    Published by: adf009 on 08/05/2013 17:19

    Disable the FK constraints

    Update of the child(ren)

    Update the parent

    reactivate the FK constraints

  • How can I enter data apple fitness?  I swim and take aerobics classes.  I don't wear my Apple Watch during this operation.

    How can I enter data of fitness on my Apple Watch?  I swim and take water aerobics classes and not wear my watch in the water.

    Hello

    It is not currently possible to enter data of fitness on Apple Watch.

    Health and fitness data Apple Watch, iPhone and any other source are rather grouped by health on your iPhone app. Combined data is reflected in the health app charts (which can be added to the dashboard), which adjust the results to avoid any double counting of data from different sources.

    To add a workout that has not been registered by your watch, iPhone, or other existing data source:

    -On your iPhone, in the application of health (icon: red heart on a white background), go to: data on health (tab) > Fitness > training > add a data Point > enter the result of your workout.

    Activity types available when you add a workout currently including swimming, but do not include aerobics (other can be used instead).

  • How can I enter BIOS compaq610 screen and set the date, time

    How can I enter BIOS compaq610 screen and set the date, time

    Hello

    See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.

    Kind regards

    DP - K

  • How can I get the exact time and date on my FAX LOG

    I have a new HP Officejet 6500 has more on my Dell Inspiron Windows XP computer.  How can I get the exact time and date on my FAX log?

    Hi FrederickFrank7,

    Journal of faxes would just follow the time of your printer. Please set the time and date of your printer.

    I am an employee of HP.
    Please indicate the position that solved your problem as "acceptable Solution".

  • How can I capture the time of startup and logon for XP users on my domain?

    How can I capture time (or time)
    -for users to access the logon screen (references)
    -users press OK after entering his credentials on the logon screen
    -Office XP that appear in a usable format moderately (for example, the user is able to open Explorer)

    We have problems with the connection of slow/slow start (SBSL) with Windows XP on the field and we would have 'real' numbers before you start so that we can have a base line and that you don't need to ask users what they mean when they say "it's a bit slower than usual" (and we'll know what stage of the startup procedure is slow). We would like to be able to capture (without intervention of the end user) following in a file or somewher event schedule so that we can measure how slow (or not), they are and what stage is slow, and what days it was slow. We are already capture the userenv logs.

    Hello

    Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in the TechNet Windows XP Networking forum.

    http://social.technet.Microsoft.com/forums/en-us/category/windowsxpitpro

  • In an attempt to sign and date a w-9, I get the following message.  "This form is editable in Adobe Acrobat DC.  Please use Adobe life cycle Designer. "How can I get this document dated and signed without having to buy the life cycle Designer?

    Please provide ideas to the next question. In an attempt to sign and date a w-9, I get the following message.  "This form is editable in Adobe Acrobat DC.  Please use Adobe life cycle Designer. "How can I get this document dated and signed without having to buy the life cycle Designer?

    Thank you

    Rick

    Assuming that you are dealing with a PDF file provided by the IRS, you will not be able to e-sign. but you can fill the fields using Adobe Reader or Acrobat. The version of form W-9 that I have does not include a date field, but you can use the feedback tool add text to add a date. You can also digitally sign or use the annotation of pencil tool to draw a signature.

  • How to subtract the DATE CURRENT SYSTEM and tire of Siebel

    Hi Experts,

    How to subtract the date of DAY and Date, which came in Siebel?

    Example:
    The DAY - Date records in Siebel

    Current date = 25/11/2012
    Registration date in Siebel = 20/11/2012

    Technically the answers I want will be 5.
    How can I do this? My idea is to put a phrase in the MDB layer, but I want to just get your ideas:

    Current_Date - "Oracle Data Warehouse. "'"' Catalogue'."" """dbo"."" TABLE_NAME ". "' COLUMN_NAME '.


    Thank you!

    Hello

    You can use the available in OBIEE timestampdiff function to get the difference between two dates. This is one of the blogs that can help with the syntax.

    http://Shahin-OBIEE.blogspot.in/2012/04/various-calculations-for-date_16.html

    You can also google timestampdiff function for details on usage and syntax.

    Thank you

  • Sharing data between planning and HFM

    Hi all

    How can we share data and metadata between HFM and planning, can you help me to list the possible ways? Epma is can be used to do?

    Thank you.

    Check this one as well:
    http://www.SlideShare.NET/Ranzal/HFM-integration-collaborate-2010
    http://www.Network54.com/Forum/58296/thread/1250272593/HFM+data+to+Essbase

    See you soon... !!!

  • How can I download data from key USB flash to a Windows 7 computer

    I need to transfer some files from my PC to my PC Windows 7 Windows XP using a USB flash key. I've used Windows Easy Transfer to move my files without problem and some programs but did not download some files. I downloaded these files on a USB flash and I can access the files, as long as the stick is pluged. How can I download data from the USB flash on my Windows 7 computer

    Hello

    The following video may help:

    http://www.YouTube.com/watch?v=hrMQh0Xkpvs

    or this article:

    http://www.swarthmore.edu/documents/administration/its/how%20To%20Use%20A%20USB%20Flash%20Drive.PDF

    and here:

    http://TECHTIPS.salon.com/use-USB-flash-drive-transfer-files-PC-Mac-2544.html

    (Mac here can be a PC).

    Good luck.

  • How can I save data in text format

    How can I save data in text format in labwindows cvi

    Hello

    If your data is in a table, the easiest is to use the ArrayToFile function.

    Automatically, it creates a file and puts your data in it depending on the size you provide.

    If you have individual samples you need to write from time to time, you can either collect them in a table and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.

    Hope this helps,

Maybe you are looking for

  • Computer re of start-up after the crash of the system office.

    After you download the Microsoft Windows malicious software removal tool, I performed a full scan and tried to restart my computer, but it did not work. I got a black screen with an error message indicating that it is ""a problem communicating with a

  • HP5524 photos of print size 10 x 15 on A4 paper

    When I print pictures from my iPad on this printer they print at a size of 10 x 15, while the printer is set to A4. Print off as usual! My previous printer HP2610 everything printed properly (A4) by following the instructions. What could be the probl

  • Unable to see AP on the first 2.2 infrastructure

    Hello Recently, I have added a new series of AP 2600 in my network. I WLC 8.3.102.0 and first 2.2.0.0.158, but I find this access point to this topic. This Approach works well with users. Any idea! See you soon

  • Muse at the catalyst - questions MENU hyperlink etc.

    Hey friends...I have here a big Web project and I need a little help from the community. ;-)The side is built like a sensitive side. I had integrated the two menus.One on Desktop Anker and the other on the mobile & Tablet Version-Anker.And here's the

  • Setting the screen brightness problem

    I have a HP pavalion G6 2226tu under warranty. I upgraded the operating system Windows Windows 8.0 to 8.1 before 10 days. After upgrade, I am not able to adjust the brightness of the screen. The function F2 and F3 keys do not work. Even after downloa