< 上一个 | 内容 | 下一个 >

C.14 Metering: Mirroring

This is a use case where a Mirror Metering function set client (e.g., a gas meter) POSTs first its general information and then its data. It also shows a client of the gas meter data retrieving the most recent 24 intervals of data. An assumption is made that prior to this sequence the mirror client has discovered the URI of the appropriate Meter Mirroring server.


image

Figure C.13—Meter Mirroring


NOTE—In most cases, registration is required to obtain access to Metering and Meter Mirroring.


Table C.15—POX example: Meter Mirroring


Step

Description

1

Meter Mirroring client POSTs a MirrorUsagePoint to the Mirror Metering server. It is including the current consumption value. This could have been done in a separate POST to the resultant MirrorUsagePoint.

Note: It passes two ReadingType definitions, one for summation and one for interval data. Client sends the following request:

POST /mup HTTP/1.1 Host: {hostname}

Content-Type: application/sep+xml Content-Length: {contentLength}

<MirrorUsagePoint xmlns="urn:ieee:std:2030.5:ns">

<mRID>0600006CC8</mRID>

<description>Gas Mirroring</description>

<roleFlags>13</roleFlags>

<serviceCategoryKind>1</serviceCategoryKind>

<status>1</status>

<deviceLFDI>00</deviceLFDI>

<MirrorMeterReading>

<mRID>0700006CC8</mRID>

<Reading>

<value>125</value>

</Reading>

<ReadingType>

<accumulationBehaviour>9</accumulationBehaviour>

<commodity>7</commodity>

<dataQualifier>0</dataQualifier>

<flowDirection>1</flowDirection>

<powerOfTenMultiplier>3</powerOfTenMultiplier>

<uom>119</uom>

</ReadingType>

</MirrorMeterReading>

</MirrorUsagePoint>

2

Mirror Metering server creates a MirrorUsagePoint and UsagePoint with the data supplied in the MirrorUsagePoint, adds it to its MirrorUsagePointList and then replies with the URI of the MirrorUsagePoint.

A typical response looks like:

HTTP/1.1 201 Created

Content-Length: 0

Location: /mup/0


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

3

Meter Mirroring client POSTs a MirrorMeterReading to the Mirror Metering server. Client sends the following request:

POST /mup/0 HTTP/1.1 Host: {hostname}

Content-Type: application/sep+xml Content-Length: {contentLength}

<MirrorMeterReading xmlns="urn:ieee:std:2030.5:ns">

<mRID>0800006CC8</mRID>

<MirrorReadingSet>

<mRID>0900006CC8</mRID>

<timePeriod>

<duration>86400</duration>

<start>1341579365</start>

</timePeriod>

<Reading>

<value>9</value>

<localID>00</localID>

</Reading>

<Reading>

<value>11</value>

<localID>01</localID>

</Reading>

<Reading>

<value>10</value>

<localID>02</localID>

</Reading>

<Reading>

<value>13</value>

<localID>03</localID>

</Reading>

<Reading>

<value>12</value>

<localID>04</localID>

</Reading>

<Reading>

<value>11</value>

<localID>05</localID>

</Reading>

<Reading>

<value>10</value>

<localID>06</localID>

</Reading>

<Reading>

<value>16</value>

<localID>07</localID>

</Reading>

<Reading>

<value>9</value>

<localID>08</localID>

</Reading>

<Reading>

<value>7</value>

<localID>09</localID>

</Reading>

<Reading>

<value>6</value>

<localID>0A</localID>

</Reading>

<Reading>

<value>5</value>

<localID>0B</localID>

</Reading>

<Reading>

<value>8</value>

<localID>0C</localID>

</Reading>

<Reading>

<value>9</value>

<localID>0D</localID>

</Reading>

<Reading>

<value>10</value>

<localID>0E</localID>

</Reading>

<Reading>



<value>12</value>

<localID>0F</localID>

</Reading>

<Reading>

<value>14</value>

<localID>10</localID>

</Reading>

<Reading>

<value>13</value>

<localID>11</localID>

</Reading>

<Reading>

<value>11</value>

<localID>12</localID>

</Reading>

<Reading>

<value>7</value>

<localID>13</localID>

</Reading>

<Reading>

<value>8</value>

<localID>14</localID>

</Reading>

<Reading>

<value>10</value>

<localID>15</localID>

</Reading>

<Reading>

<value>10</value>

<localID>16</localID>

</Reading>

<Reading>

<value>10</value>

<localID>17</localID>

</Reading>

</MirrorReadingSet>

</MirrorMeterReading>

4

Mirror Metering server creates a MirrorMeterReading with the data supplied in the MirrorUsagePoint and then replies with the URI of the MirrorMeterReading.

A typical response looks like:

HTTP/1.1 201 Created

Content-Length: 0 Location: /upt/1/mr

Note: Steps 1 through 4 could be combined into two steps by including the initial interval reading set data in the initial MirrorUsagePoint POST.

5

Mirror data client GETs the UsagePointList from the Metering server.

Note: If directed through FunctionSetAssignments to a particular UsagePoint, these first two steps would be skipped.

Client sends the following request:

GET /upt HTTP/1.1 Host: {hostname}

Accept: application/sep+xml


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

6

Mirror Metering server replies with UsagePointList. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<UsagePointList all="2" href="/upt" results="2" subscribable="0" xmlns="urn:ieee:std:2030.5:ns">

<UsagePoint href="/upt/0">

<mRID>0B00006CC8</mRID>

<description>Usage Point</description>

<roleFlags>12</roleFlags>

<serviceCategoryKind>0</serviceCategoryKind>

<status>1</status>

<MeterReadingListLink all="6" href="/upt/0/mr"/>

</UsagePoint>

<UsagePoint href="/upt/1">

<mRID>0C00006CC8</mRID>

<description>Usage Point</description>

<roleFlags>13</roleFlags>

<serviceCategoryKind>1</serviceCategoryKind>

<status>1</status>

<MeterReadingListLink all="2" href="/upt/1/mr"/>

</UsagePoint>

</UsagePointList>

7

Mirror data client GETs the MeterReadingList from the Mirror Metering server. Note: We will choose /upt/1 because its role flags indicate it is a mirror.

Note: This and the next three steps may be repeated for each page required to read the entire list. For this example, we are requesting up to ten MeterReadings at a time. Subsequent GETs would increment the “s” query parameter by ten or however many list items are returned.

Client sends the following request:

GET /upt/1/mr?s=0&l=10 HTTP/1.1 Host: {hostname}

Accept: application/sep+xml

8

Mirror Metering server replies with up to 10 MeterReadingList instances. Only two are returned in this case as indicated by the MeterReadingListLink “all” attribute in step 6.

A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<MeterReadingList all="2" href="/upt/1/mr" results="2" subscribable="0" xmlns="urn:ieee:std:2030.5:ns">

<MeterReading href="/upt/1/mr/0">

<mRID>0700006CC8</mRID>

<description>Cumulative Reading for Gas</description>

<ReadingLink href="/upt/1/mr/0/r"/>

<ReadingTypeLink href="/upt/1/mr/0/rt"/>

</MeterReading>

<MeterReading href="/upt/1/mr/1">

<mRID>0800006CC8</mRID>

<description> Interval Readings for Gas</description>

<ReadingSetListLink all="1" href="/upt/1/mr/1/rs"/>

<ReadingTypeLink href="/upt/1/mr/1/rt"/>

</MeterReading>

</MeterReadingList>


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

9

Mirror data client GETs the ReadingType from the Mirror Metering server.

Note: Step 9 and step 10 may be repeated for each MeterReading returned in step 4 to identify the MeterReading of interest by iterating through the MeterReadings returned in step 4.

Client sends the following request:

GET /upt/1/mr/1/rt HTTP/1.1 Host: {hostname}

Accept: application/sep+xml

10

Mirror Metering server replies with ReadingType. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<ReadingType href="/upt/1/mr/1/rt" xmlns="urn:ieee:std:2030.5:ns">

<accumulationBehaviour>4</accumulationBehaviour>

<commodity>7</commodity>

<flowDirection>1</flowDirection>

<powerOfTenMultiplier>3</powerOfTenMultiplier>

<uom>119</uom>

</ReadingType>

Note: Once the desired ReadingType is identified we proceed to the next step.

11

Mirror data client GETs the ReadingSetList from the Metering server.

Note: Because the ReadingSet resources are ordered by their timePeriod earliest time first, we can read the first ReadingSet to get the current values. If a particular historic value is desired, you would traverse the ReadingSetList looking for the ReadingSet with the appropriate time stamp.

Client sends the following request:

GET /upt/1/mr/1/rs?s=0&l=1 HTTP/1.1 Host: {hostname}

Accept: application/sep+xml

12

Mirror Metering server replies with ReadingSetList with the ReadingSet of interest. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<ReadingSetList all="1" href="/upt/1/mr/1/rs" results="1" subscribable="0" xmlns="urn:ieee:std:2030.5:ns">

<ReadingSet href="/upt/1/mr/1/rs/32">

<mRID>2000006CC8</mRID>

<timePeriod>

<duration>86400</duration>

<start>1341579365</start>

</timePeriod>

<ReadingListLink all="24" href="/upt/1/mr/1/rs/32/r"/>

</ReadingSet>

</ReadingSetList>

13

Mirror data client GETs the ReadingList from the Mirror Metering server. Client sends the following request:

GET /upt/1/mr/1/rs/32/r?s=0&l=24 HTTP/1.1 Host: {hostname}

Accept: application/sep+xml


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

14

Mirror Metering server replies with ReadingList with the Reading of interest. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<ReadingList all="24" href="/upt/1/mr/1/rs/32/r" results="24" xmlns="urn:ieee:std:2030.5:ns">

<Reading href="/upt/1/mr/1/rs/32/r/4">

<value>9</value>

<localID>00</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/5">

<value>11</value>

<localID>01</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/6">

<value>10</value>

<localID>02</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/7">

<value>13</value>

<localID>03</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/8">

<value>12</value>

<localID>04</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/9">

<value>11</value>

<localID>05</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/a">

<value>10</value>

<localID>06</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/b">

<value>16</value>

<localID>07</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/c">

<value>9</value>

<localID>08</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/d">

<value>7</value>

<localID>09</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/e">

<value>6</value>

<localID>0A</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/f">

<value>5</value>

<localID>0B</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/10">

<value>8</value>

<localID>0C</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/11">

<value>9</value>

<localID>0D</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/12">

<value>10</value>

<localID>0E</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/13">

<value>12</value>

<localID>0F</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/14">

<value>14</value>

<localID>10</localID>

</Reading>



<Reading href="/upt/1/mr/1/rs/32/r/15">

<value>13</value>

<localID>11</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/16">

<value>11</value>

<localID>12</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/17">

<value>7</value>

<localID>13</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/0">

<value>8</value>

<localID>14</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/1">

<value>10</value>

<localID>15</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/2">

<value>10</value>

<localID>16</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/32/r/3">

<value>10</value>

<localID>17</localID>

</Reading>

</ReadingList>

15

The next day, the Meter Mirroring client POSTs a MirrorMeterReadingList with MirrorMeterReadings to the Mirror Metering server. The first MirrorMeterReading is the consumption (cumulative) value and the second MirrorMeterReading is a set of interval data.

Client sends the following request:

POST /mup/0 HTTP/1.1 Host: {hostname}

Content-Type: application/sep+xml Content-Length: {contentLength}

<MirrorMeterReadingList xmlns="urn:ieee:std:2030.5:ns">

<MirrorMeterReading>

<mRID>0700006CC8</mRID>

<Reading>

<value>574</value>

</Reading>

</MirrorMeterReading>

<MirrorMeterReading>

<mRID>0800006CC8</mRID>

<MirrorReadingSet>

<mRID>0900006CC8</mRID>

<timePeriod>

<duration>86400</duration>

<start>1341665765</start>

</timePeriod>

<Reading>

<value>9</value>

<localID>00</localID>

</Reading>

<Reading>

<value>12</value>

<localID>01</localID>

</Reading>

<Reading>

<value>10</value>

<localID>02</localID>

</Reading>

<Reading>

<value>13</value>

<localID>03</localID>

</Reading>

<Reading>

<value>11</value>

<localID>04</localID>

</Reading>

<Reading>

<value>11</value>



<localID>05</localID>

</Reading>

<Reading>

<value>10</value>

<localID>06</localID>

</Reading>

<Reading>

<value>12</value>

<localID>07</localID>

</Reading>

<Reading>

<value>9</value>

<localID>08</localID>

</Reading>

<Reading>

<value>7</value>

<localID>09</localID>

</Reading>

<Reading>

<value>6</value>

<localID>0A</localID>

</Reading>

<Reading>

<value>5</value>

<localID>0B</localID>

</Reading>

<Reading>

<value>8</value>

<localID>0C</localID>

</Reading>

<Reading>

<value>9</value>

<localID>0D</localID>

</Reading>

<Reading>

<value>10</value>

<localID>0E</localID>

</Reading>

<Reading>

<value>12</value>

<localID>0F</localID>

</Reading>

<Reading>

<value>14</value>

<localID>10</localID>

</Reading>

<Reading>

<value>13</value>

<localID>11</localID>

</Reading>

<Reading>

<value>11</value>

<localID>12</localID>

</Reading>

<Reading>

<value>7</value>

<localID>13</localID>

</Reading>

<Reading>

<value>8</value>

<localID>14</localID>

</Reading>

<Reading>

<value>10</value>

<localID>15</localID>

</Reading>

<Reading>

<value>10</value>

<localID>16</localID>

</Reading>

<Reading>

<value>10</value>

<localID>17</localID>

</Reading>

</MirrorReadingSet>

</MirrorMeterReading>

</MirrorMeterReadingList>


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

16

Mirror Metering server copies the data supplied into the corresponding UsagePoint and then replies with the URI of the MeterReadingList of that UsagePoint.

A typical response looks like:

HTTP/1.1 201 Created

Content-Length: 0

Location: /upt/1/mr

17

Mirror data client GETs the ReadingSetList from the Mirror Metering server.

Note: Because the client cached the URI of the reading set list, it can skip ahead to this step. Client sends the following request:

GET /upt/1/mr/1/rs?s=0&l=1 HTTP/1.1 Host: {hostname}

Accept: application/sep+xml

18

Mirror Metering server replies with ReadingSetList with the ReadingSet of interest. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<ReadingSetList all="1" href="/upt/1/mr/1/rs" results="1" subscribable="0" xmlns="urn:ieee:std:2030.5:ns">

<ReadingSet href="/upt/1/mr/1/rs/33">

<mRID>A000006CC8</mRID>

<timePeriod>

<duration>86400</duration>

<start>1341665765</start>

</timePeriod>

<ReadingListLink all="24" href="/upt/1/mr/1/rs/33/r"/>

</ReadingSet>

</ReadingSetList>

19

Mirror data client GETs the ReadingList from the Mirror Metering server. Client sends the following request:

GET /upt/1/mr/1/rs/33/r?s=0&l=24 HTTP/1.1 Host: {hostname}

Accept: application/sep+xml


Table C.15—POX example: Meter Mirroring (continued)

Step

Description

20

Mirror Metering server replies with ReadingList with the Reading of interest. A typical response looks like:

HTTP/1.1 200 OK

Content-Type: application/sep+xml Content-Length: {contentLength}

<ReadingList all="12" href="/upt/1/mr/1/rs/33/r" results="24" xmlns="urn:ieee:std:2030.5:ns">

<Reading href="/upt/1/mr/1/rs/33/r/4">

<value>9</value>

<localID>00</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/5">

<value>12</value>

<localID>01</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/6">

<value>10</value>

<localID>02</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/7">

<value>13</value>

<localID>03</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/8">

<value>11</value>

<localID>04</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/9">

<value>11</value>

<localID>05</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/a">

<value>10</value>

<localID>06</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/b">

<value>12</value>

<localID>07</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/c">

<value>9</value>

<localID>08</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/d">

<value>7</value>

<localID>09</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/e">

<value>6</value>

<localID>0A</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/f">

<value>5</value>

<localID>0B</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/10">

<value>8</value>

<localID>0C</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/11">

<value>9</value>

<localID>0D</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/12">

<value>10</value>

<localID>0E</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/13">

<value>12</value>

<localID>0F</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/14">

<value>14</value>

<localID>10</localID>



</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/15">

<value>13</value>

<localID>11</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/16">

<value>11</value>

<localID>12</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/17">

<value>7</value>

<localID>13</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/0">

<value>8</value>

<localID>14</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/1">

<value>10</value>

<localID>15</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/2">

<value>10</value>

<localID>16</localID>

</Reading>

<Reading href="/upt/1/mr/1/rs/33/r/3">

<value>10</value>

<localID>17</localID>

</Reading>

</ReadingList>