bacnet/__init__.py
author Edouard Tisserant
Tue, 25 Aug 2020 14:32:39 +0200
branchsvghmi
changeset 3036 4930455428df
parent 2250 86f61c4dfe76
child 3750 f62625418bff
permissions -rw-r--r--
SVGHMI: JsonTable now use intermediate variables again to address JSON data without duplicating code or referencing. Using intermediate variables also alows to check for availability of data and stop evaluating early if data is missing. Finally added complete roundtrip example to illustrate use of JSonTable to display "alarms" collected in python from changes on PLC boolean variables.
2020
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     1
#!/usr/bin/env python
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     2
# -*- coding: utf-8 -*-
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     3
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     4
# This file is part of Beremiz, a Integrated Development Environment for
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     5
# programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     6
#
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     7
# Copyright (c) 2017 Mario de Sousa (msousa@fe.up.pt)
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     8
#
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
     9
# This program is free software: you can redistribute it and/or modify
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    10
# it under the terms of the GNU General Public License as published by
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    11
# the Free Software Foundation, either version 2 of the License, or
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    12
# (at your option) any later version.
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    13
#
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    14
# This program is distributed in the hope that it will be useful,
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    17
# GNU General Public License for more details.
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    18
#
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    19
# You should have received a copy of the GNU General Public License
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    20
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
2250
86f61c4dfe76 Passed bacnet*.py through autopep8, and attemped to fix manually what went wrong + fixed pylint complains
Edouard Tisserant
parents: 2020
diff changeset
    21
#
2020
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    22
# This code is made available on the understanding that it will not be
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    23
# used in safety-critical situations without a full and competent review.
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    24
6dddf3070806 Add BACnet extension from Mario de Sousa <msousa@fe.up.pt>
Edouard Tisserant
parents:
diff changeset
    25
2250
86f61c4dfe76 Passed bacnet*.py through autopep8, and attemped to fix manually what went wrong + fixed pylint complains
Edouard Tisserant
parents: 2020
diff changeset
    26
from __future__ import absolute_import
86f61c4dfe76 Passed bacnet*.py through autopep8, and attemped to fix manually what went wrong + fixed pylint complains
Edouard Tisserant
parents: 2020
diff changeset
    27
86f61c4dfe76 Passed bacnet*.py through autopep8, and attemped to fix manually what went wrong + fixed pylint complains
Edouard Tisserant
parents: 2020
diff changeset
    28
from bacnet.bacnet import *