Hi,
As Lewis says, Stream device can work for many cases - there is an example at http://epics.web.psi.ch/software/streamdevice/doc/tipsandtricks.html#web
If you find you need something more complicated, drop me a direct email as I have had need to combine asyn with libxml2, curl & htmltidy in the past to scrape a web page using XPath expressions and I might be able to point you at something usable
Regards,
Freddie
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of J. Lewis Muir
Sent: 22 May 2018 23:05
To: Sobhani, Bayan
Cc: [email protected]
Subject: Re: Is it possible to make an IOC for an HTTP device?
On 05/22, Sobhani, Bayan wrote:
> I am looking at this device:
>
> https://www.embeddeddatasystems.com/HA7Net--Ethernet-1-Wire-Host-Adapt
> er_p_22.html
>
> It says that communication is done with the HTTP protocol - is this significant? Would it be doable for me to make an IOC that uses let's say StreamDevice to communicate with this?
It just depends on what the device's communication interface is like.
You said it's the HTTP protocol, but you need to know what the requests look like (e.g., what resource do you request with an HTTP GET) and what responses look like. If things are really simple, you could use StreamDevice. Even if the responses are real web pages, you could still potentially use StreamDevice if you can figure out how to match on the parts of the response that you want. This is known as screen scraping or web scraping; it's a hack, but it could be sufficient. If it returns a complex HTML document, complex XML document, or some nontrivial binary response, etc., then you would want to move beyond StreamDevice and write something (probably based on asyn) that can actually properly parse the response.
Regards,
Lewis
- Replies:
- Re: Is it possible to make an IOC for an HTTP device? Eric Norum
- References:
- Is it possible to make an IOC for an HTTP device? Sobhani, Bayan
- Re: Is it possible to make an IOC for an HTTP device? J. Lewis Muir
- Navigate by Date:
- Prev:
Re: Is it possible to make an IOC for an HTTP device? J. Lewis Muir
- Next:
Re: Is it possible to make an IOC for an HTTP device? Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Is it possible to make an IOC for an HTTP device? J. Lewis Muir
- Next:
Re: Is it possible to make an IOC for an HTTP device? Eric Norum
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
<2018>
2019
2020
2021
2022
2023
2024
|