Jump to content

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

From Flowcode Help
XML import
 
No edit summary
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==
==[[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.
Easily allows you to collect the news headlines and stories from the BBC RSS feed.


==Examples==
==Detailed description==
''<span style="color:red;">No additional examples</span>''


''No detailed description exists yet for this component''


==Downloadable macro reference==
==Examples==


===<span style="font-weight: normal;"><u><tt>GetURL</tt></u></span>===
Get Selected News Item URL


'''Parameters'''
''<span style="color:red;">No additional examples</span>''


:''This macro has no parameters''


==Downloadable macro reference==


'''Return value'''
{| 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''
|}


:[[Variable Types|STRING]]


{| 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><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.
{| 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''
|}


Must be called before trying to call any of the GetXXX macros.


'''Parameters'''
{| 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''
|}


:[[Variable Types|UINT]] ''ItemNumber''
::Headline Index To Read


{| 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''
|}


'''Return value'''


:[[Variable Types|UINT]]
{| 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;" | '''IOSetOutputPin'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Pin
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:]] -
| width="90%" | State
|-
| colspan="2" | &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''
|}




===<span style="font-weight: normal;"><u><tt>GetTitle</tt></u></span>===
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
Get Selected News Item Title
|-
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &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''
|}


'''Parameters'''


:''This macro has no parameters''
{| 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 injector ready to receive commands or send 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''
|}




'''Return value'''
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
:[[Variable Types|STRING]]
| width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''UARTSend'''
|-
| colspan="2" | &nbsp;
|-
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Channel
|-
| colspan="2" | &nbsp;
|-
| width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE
| width="90%" | Data
|-
| colspan="2" | &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''
|}




===<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==
==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''.
{| class="wikitable" style="width:60%; background-color:#FFFFFF;"
 
|-
Network Communications component to use as the bridge to the TCP/IP network.
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-prop-icon.png]]
 
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Properties'''  
<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''.
| width="10%" align="center" | [[File:Fc9-type-17-icon.png]]
 
| width="90%" | Network Comms Component
IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk
|-
 
| colspan="2" | Network Communications component to use as the bridge to the TCP/IP network.&nbsp;
<span style="font-weight: normal;"><u>News Feed</u></span>
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
This property is of type ''Fixed list of ints'' and can be referenced with the variable name ''Subtopic''.
| width="90%" | BBC IP Address
 
|-
''<span style="color:red;">No additional information</span>''
| 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
<span style="font-weight: normal;"><u>Feed URL</u></span>
|-
 
| colspan="2" | &nbsp;
This property is of type ''Line of text'' and can be referenced with the variable name ''FeedURL''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-10-icon.png]]
''<span style="color:red;">No additional information</span>''
| width="90%" | Feed URL
 
|-
 
| colspan="2" | &nbsp;
 
|-
<span style="font-weight: normal;"><u>Receive Timeout</u></span>
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Receive Timeout
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''RxTimeout''.
|-
 
| colspan="2" | Maximum time to wait for valid incoming data.&nbsp;
Maximum time to wait for valid incoming data.
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
<span style="font-weight: normal;"><u>Record Title</u></span>
| width="90%" | Record Title
 
|-
This property is of type ''True or false'' and can be referenced with the variable name ''RecordTitle''.
| colspan="2" | Stores the news topic title into RAM.&nbsp;
 
|-
Stores the news topic title into RAM.
| width="10%" align="center" | [[File:Fc9-type-21-icon.png]]
 
| width="90%" | Title Buffer Size
<span style="font-weight: normal;"><u>Title Buffer Size</u></span>
|-
 
| colspan="2" | Number of bytes to allocate to storing titles.&nbsp;
This property is of type ''Unsigned integer'' and can be referenced with the variable name ''TitleBufferSize''.
|-
 
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
Number of bytes to allocate to storing titles.
| width="90%" | Record Description
 
|-
<span style="font-weight: normal;"><u>Record Description</u></span>
| colspan="2" | Stores the news topic description into RAM.&nbsp;
 
|-
This property is of type ''True or false'' and can be referenced with the variable name ''RecordDesc''.
| width="10%" align="center" | [[File:Fc9-type-7-icon.png]]
 
| width="90%" | Record URL
Stores the news topic description into RAM.
|-
 
| colspan="2" | Records the news topics full story URL into RAM&nbsp;
<span style="font-weight: normal;"><u>Record URL</u></span>
|-
 
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
This property is of type ''True or false'' and can be referenced with the variable name ''RecordURL''.
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Connections'''  
 
|-
Records the news topics full story URL into RAM
|-
| width="10%" align="center" style="background-color:#D8C9D8;" | [[File:Fc9-conn-icon.png]]
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Simulations'''  
|-
|}

Revision as of 19:48, 16 November 2021

Author MatrixTSL
Version 1.0
Category Comms: IoT/Cloud


BBC News component

Easily allows you to collect the news headlines and stories from the BBC RSS feed.

Detailed description

No detailed description exists yet for this component

Examples

No additional examples


Downloadable macro reference

GetURL
Get Selected News Item URL 
- STRING Return


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. 
- UINT ItemNumber
Headline Index To Read 
- UINT Return


GetTitle
Get Selected News Item Title 
- STRING Return


GetDescription
Get Selected News Item Description 
- STRING Return


Initialise
Sets up the component ready to collect news data. 
- VOID Return


IOSetOutputPin
 
- BYTE Pin
 
[[File:]] - State
 
- VOID Return


UARTSend
 
- BYTE Channel
 
- BYTE Data
 
- VOID Return


Initialise
Sets up the injector ready to receive commands or send data 
- VOID Return


UARTSend
 
- BYTE Channel
 
- BYTE Data
 
- VOID Return



Property reference

Properties
Network Comms Component
Network Communications component to use as the bridge to the TCP/IP network. 
BBC IP Address
IP Address linked to the following URL: weather-broker-cdn.api.bbci.co.uk 
News Feed
 
Feed URL
 
Receive Timeout
Maximum time to wait for valid incoming data. 
Record Title
Stores the news topic title into RAM. 
Title Buffer Size
Number of bytes to allocate to storing titles. 
Record Description
Stores the news topic description into RAM. 
Record URL
Records the news topics full story URL into RAM 
Connections
Simulations