|
3 | 3 | # See License.txt in the project root for |
4 | 4 | # license information. |
5 | 5 | # -------------------------------------------------------------------------- |
| 6 | +r""" |
6 | 7 |
|
7 | | -__version__ = "1.1.2" |
8 | | -from . import connection, error |
9 | | - |
10 | | -def path_split(path): |
11 | | - '''Used to split the standard Kepware address decimal notation into a dict that contains the |
12 | | - "channel", "device" and "tag_path". |
| 8 | +**Kepware Configuration (kepconfig) API Library** |
| 9 | +-- |
13 | 10 |
|
14 | | - Ex. path input = "ch1.dev1.tg1.tg2.tg3" |
| 11 | +This is a package to help create Python applications to conduct operations with the Kepware Configuration API. |
| 12 | +This package is designed to work with all versions of Kepware that support the Configuration API including |
| 13 | +Thingworx Kepware Server (TKS), Thingworx Kepware Edge (TKE) and KEPServerEX (KEP). |
15 | 14 |
|
16 | | - Returns: {'channel': 'ch1', 'device': 'dev1', 'tag_path': ['tg1','tg2','tg3']} |
| 15 | +Copyright (c) PTC Inc. and/or all its affiliates. All rights reserved. |
| 16 | +See License.txt in the project root for |
| 17 | +license information. |
17 | 18 |
|
18 | | - Ex. path input = "ch1.dev1" |
19 | | -
|
20 | | - Returns: {'channel': 'ch1', 'device': 'dev1'} |
21 | | - ''' |
22 | | - path_list = path.split('.', 2) |
23 | | - path_obj = {} |
24 | | - for x in range(0, len(path_list)): |
25 | | - if x == 0: |
26 | | - path_obj['channel'] = path_list[0] |
27 | | - elif x == 1: |
28 | | - path_obj['device'] = path_list[1] |
29 | | - else: |
30 | | - path_obj['tag_path'] = path_list[2].split('.') |
31 | | - return path_obj |
| 19 | +""" |
| 20 | +__version__ = "1.1.2" |
| 21 | +from . import connection, error |
| 22 | +from .utils import path_split |
32 | 23 |
|
33 | | -def _address_dedecimal(tag_address): |
34 | | - if tag_address[0] is '_': |
35 | | - tag_address = tag_address[1::] |
36 | | - updated = tag_address.replace('.','_') |
37 | | - return updated |
0 commit comments