Skip to content

SubscriptionMatching

jhaack edited this page Oct 21, 2015 · 2 revisions

Deprecated

Declaratively attach topic prefix and additional tests for topic matching to agent methods allowing for automated callback registration and topic subscription.

Example:

    class MyAgent(BaseAgent):
        @match_regex('topic1/(sub|next|part)/title[1-9]')
        def on_subtopic(topic, headers, message, match):
            # This is only executed if topic matches regex
            ...

        @match_glob('root/sub/*/leaf')
        def on_leafnode(topic, headers, message, match):
            # This is only executed if topic matches glob
            ...

        @match_exact('building/xyz/unit/condenser')
        @match_start('campus/PNNL')
        @match_end('unit/blower')
        def on_multimatch(topic, headers, message, match):
            # Multiple matchers can be attached to a method
            ...
'''

Wiki Home

Quick Start Guide

Getting VOLTTRON

VOLTTRON Community

VOLTTRON Core Services

Historians

Drivers

Instance Management

Applications
  • ...
Examples
Developers
HOWTOS

VOLTTRON Versions and Features

Transactional Network Platform Overview

Platform Services

Volttron Restricted

Information Exchange Standards

FAQ

Project Home

Clone this wiki locally