Difference between revisions of "Component: BBC News (Comms: IoT/Cloud)"

From Flowcode Help
Jump to navigationJump to search
(XML import)
 
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
+
{| style="width:50%"
 
 
{| width="50%"
 
 
|-
 
|-
| width="20%" style="color: gray;" | Author
+
| width="20%" style="color:gray;" | Author
 
| MatrixTSL
 
| MatrixTSL
 
|-
 
|-
| width="20%" style="color: gray;" | Version
+
| width="20%" style="color:gray;" | Version
| 1.0 (Release)
+
| 1.0
 
|-
 
|-
| width="20%" style="color: gray;" | Category
+
| width="20%" style="color:gray;" | Category
 
| Comms: IoT/Cloud
 
| Comms: IoT/Cloud
 
|}
 
|}
 +
 +
 +
==BBC News component==
 +
Create an LED, gLCD or LCD news ticker in homes, business and outside for the public.  Automatally receive the latest news without your mobile or computer switched on.  Easily allows you to collect the news headlines and stories from the BBC RSS feed.  This component is used for data gathering from the internet.
 +
 +
==Component Source Code==
 +
 +
Please click here to download the component source project: [https://www.flowcode.co.uk/wiki/componentsource/FC_Comp_Source_BBCNews.fcfx FC_Comp_Source_BBCNews.fcfx]
 +
 +
Please click here to view the component source code (Beta): [https://www.flowcode.co.uk/FlowchartView/?wfile=componentsource/FC_Comp_Source_BBCNews.fcfx FC_Comp_Source_BBCNews.fcfx]
 +
 +
==Detailed description==
  
  
  
==[[File:Component Icon 72cd9559_26f7_4ffd_984c_cf3a82a6db16.png|Image]] BBC News component==
 
Easily allows you to collect the news headlines and stories from the BBC RSS feed.
 
  
==Examples==
 
''<span style="color:red;">No additional examples</span>''
 
  
  
==Downloadable macro reference==
 
  
===<span style="font-weight: normal;"><u><tt>GetURL</tt></u></span>===
 
Get Selected News Item URL
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>RequestData</tt></u></span>===
 
Requests data about your selected location from the BBC weather service.
 
  
Returns the number of headlines if the request was successful.
 
  
Must be called before trying to call any of the GetXXX macros.
 
  
'''Parameters'''
 
  
:[[Variable Types|UINT]] ''ItemNumber''
 
::Headline Index To Read
 
  
  
'''Return value'''
 
  
:[[Variable Types|UINT]]
 
  
  
===<span style="font-weight: normal;"><u><tt>GetTitle</tt></u></span>===
 
Get Selected News Item Title
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
+
''No detailed description exists yet for this component''
  
 +
==Examples==
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>GetDescription</tt></u></span>===
 
Get Selected News Item Description
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:[[Variable Types|STRING]]
 
  
  
===<span style="font-weight: normal;"><u><tt>Initialise</tt></u></span>===
 
Sets up the component ready to collect weather data.
 
  
'''Parameters'''
 
  
:''This macro has no parameters''
 
  
  
'''Return value'''
 
  
:''This call does not return a value''
 
  
  
  
==Simulation macro reference==
 
  
''This component does not contain any simulation macros''
 
  
  
==Property reference==
 
<span style="font-weight: normal;"><u>Network Comms Component</u></span>
 
  
This property is of type ''Panel object'' and can be referenced with the variable name ''NetworkCommsComp''.
 
  
Network Communications component to use as the bridge to the TCP/IP network.
 
  
<span style="font-weight: normal;"><u>BBC IP Address</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''IPAddr''.
+
''<span style="color:red;">No additional examples</span>''
  
IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk
 
  
<span style="font-weight: normal;"><u>News Feed</u></span>
 
  
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Subtopic''.
 
  
''<span style="color:red;">No additional information</span>''
 
  
  
  
<span style="font-weight: normal;"><u>Feed URL</u></span>
 
  
This property is of type ''Line of text'' and can be referenced with the variable name ''FeedURL''.
 
  
''<span style="color:red;">No additional information</span>''
 
  
  
  
<span style="font-weight: normal;"><u>Receive Timeout</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''RxTimeout''.
 
  
Maximum time to wait for valid incoming data.
+
==Macro reference==
  
<span style="font-weight: normal;"><u>Record Title</u></span>
+
===GetDescription===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetDescription'''
 +
|-
 +
| colspan="2" | Get Selected News Item Description&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''True or false'' and can be referenced with the variable name ''RecordTitle''.
 
  
Stores the news topic title into RAM.
+
===GetTitle===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetTitle'''
 +
|-
 +
| colspan="2" | Get Selected News Item Title&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<span style="font-weight: normal;"><u>Title Buffer Size</u></span>
 
  
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''TitleBufferSize''.
+
===GetURL===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetURL'''
 +
|-
 +
| colspan="2" | Get Selected News Item URL&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-string-icon.png]] - STRING
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
Number of bytes to allocate to storing titles.
 
  
<span style="font-weight: normal;"><u>Record Description</u></span>
+
===Initialise===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise'''
 +
|-
 +
| colspan="2" | Sets up the component ready to collect news data.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
This property is of type ''True or false'' and can be referenced with the variable name ''RecordDesc''.
 
  
Stores the news topic description into RAM.
+
===RequestData===
 +
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''RequestData'''
 +
|-
 +
| colspan="2" | Requests data about your selected location from the BBC news service. Returns the number of headlines if the request was successful. Must be called before trying to call any of the GetXXX macros.&nbsp;
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" | ItemNumber
 +
|-
 +
| colspan="2" | Headline Index To Read&nbsp;
 +
|-
 +
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT
 +
| width="90%" style="border-top: 2px solid #000;" | ''Return''
 +
|}
  
<span style="font-weight: normal;"><u>Record URL</u></span>
 
  
This property is of type ''True or false'' and can be referenced with the variable name ''RecordURL''.
+
==Property reference==
  
Records the news topics full story URL into RAM
+
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 +
|-
 +
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 +
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | LinkTo
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | BBC IP Address
 +
|-
 +
| colspan="2" | IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-16-icon.png]]
 +
| width="90%" | News Feed
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
 +
| width="90%" | Feed URL
 +
|-
 +
| colspan="2" | &nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Receive Timeout
 +
|-
 +
| colspan="2" | Maximum time to wait for valid incoming data.&nbsp;
 +
|-
 +
| width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]]
 +
| width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Data
 +
|-
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Record Title
 +
|-
 +
| colspan="2" | Stores the news topic title into RAM.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 +
| width="90%" | Title Buffer Size
 +
|-
 +
| colspan="2" | Number of bytes to allocate to storing titles.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Record Description
 +
|-
 +
| colspan="2" | Stores the news topic description into RAM.&nbsp;
 +
|-
 +
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 +
| width="90%" | Record URL
 +
|-
 +
| colspan="2" | Records the news topics full story URL into RAM&nbsp;
 +
|}

Latest revision as of 11:57, 3 November 2023

Author MatrixTSL
Version 1.0
Category Comms: IoT/Cloud


BBC News component

Create an LED, gLCD or LCD news ticker in homes, business and outside for the public. Automatally receive the latest news without your mobile or computer switched on. Easily allows you to collect the news headlines and stories from the BBC RSS feed. This component is used for data gathering from the internet.

Component Source Code

Please click here to download the component source project: FC_Comp_Source_BBCNews.fcfx

Please click here to view the component source code (Beta): FC_Comp_Source_BBCNews.fcfx

Detailed description

No detailed description exists yet for this component

Examples

No additional examples








Macro reference

GetDescription

Fc9-comp-macro.png GetDescription
Get Selected News Item Description 
Fc9-string-icon.png - STRING Return


GetTitle

Fc9-comp-macro.png GetTitle
Get Selected News Item Title 
Fc9-string-icon.png - STRING Return


GetURL

Fc9-comp-macro.png GetURL
Get Selected News Item URL 
Fc9-string-icon.png - STRING Return


Initialise

Fc9-comp-macro.png Initialise
Sets up the component ready to collect news data. 
Fc9-void-icon.png - VOID Return


RequestData

Fc9-comp-macro.png RequestData
Requests data about your selected location from the BBC news service. Returns the number of headlines if the request was successful. Must be called before trying to call any of the GetXXX macros. 
Fc9-u16-icon.png - UINT ItemNumber
Headline Index To Read 
Fc9-u16-icon.png - UINT Return


Property reference

Fc9-prop-icon.png Properties
Fc9-type-16-icon.png LinkTo
 
Fc9-type-10-icon.png BBC IP Address
IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk 
Fc9-type-16-icon.png News Feed
 
Fc9-type-10-icon.png Feed URL
 
Fc9-type-21-icon.png Receive Timeout
Maximum time to wait for valid incoming data. 
Fc9-conn-icon.png Data
Fc9-type-7-icon.png Record Title
Stores the news topic title into RAM. 
Fc9-type-21-icon.png Title Buffer Size
Number of bytes to allocate to storing titles. 
Fc9-type-7-icon.png Record Description
Stores the news topic description into RAM. 
Fc9-type-7-icon.png Record URL
Records the news topics full story URL into RAM