|
1 <?xml version="1.0" encoding="utf-8"?> |
|
2 <!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
|
3 <!-- This component and the accompanying materials are made available under the terms of the License |
|
4 "Eclipse Public License v1.0" which accompanies this distribution, |
|
5 and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
|
6 <!-- Initial Contributors: |
|
7 Nokia Corporation - initial contribution. |
|
8 Contributors: |
|
9 --> |
|
10 <!DOCTYPE concept |
|
11 PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
|
12 <concept id="GUID-C705B0D5-055A-5DAA-9C6E-2FC3519FA50C" xml:lang="en"><title>Publish |
|
13 and Subscribe Overview</title><shortdesc>This topic explains the overview of publish and subscribe.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody> |
|
14 <section id="GUID-5F3F1973-C819-436F-A9E2-B02E62F94A29"><title>Purpose</title> <p>Allows global variables to be set and retrieved, |
|
15 and allows subscribers to be notified that variables have changed. Note that |
|
16 you may find such global variables referred to as properties.</p> </section> |
|
17 <section id="GUID-40E87759-7EF6-4503-95CF-9297D2EC2AB1"><title>Architectural relationships</title> <p>Publish and Subscribe |
|
18 is implemented on the Kernel side and is accessed from the user side through |
|
19 the <xref href="GUID-C4776034-D190-3FC4-AF45-C7F195093AC3.dita"><apiname>RProperty</apiname></xref> handle.</p> </section> |
|
20 <section id="GUID-70948A73-79DA-4033-94D0-E6B2046E55B3"><title>Description</title> <p>Publish and Subscribe has three main |
|
21 components: properties, publishers and subscribers.</p> <p><b>Properties</b> </p> <p>A property is a single data value, that can be either a single 32-bit |
|
22 value or a variable length set of bytes referred to as a byte array. A byte |
|
23 array has a maximum size defined by <xref href="GUID-C4776034-D190-3FC4-AF45-C7F195093AC3.dita#GUID-C4776034-D190-3FC4-AF45-C7F195093AC3/GUID-57E64054-610A-31D1-AD7F-E2F9F9FC1DCB"><apiname>RProperty::KMaxPropertySize</apiname></xref>.</p> <p><b>Publishers</b> </p> <p>Publishers are threads that define and update a |
|
24 property.</p> <p><b>Subscribers</b> </p> <p>Subscribers |
|
25 are threads that listen for changes to a property, and can get the current |
|
26 value of a property. Typically, a thread gets the value of a property when |
|
27 notified of changes.</p> </section> |
|
28 </conbody></concept> |