1 #!/usr/bin/env python |
1 #!/usr/bin/env python |
2 # -*- coding: utf-8 -*- |
2 # -*- coding: utf-8 -*- |
3 |
3 |
4 #This file is part of CanFestival, a library implementing CanOpen Stack. |
4 #This file is part of Beremiz, a Integrated Development Environment for |
|
5 #programming IEC 61131-3 automates supporting plcopen standard and CanFestival. |
5 # |
6 # |
6 #Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD |
7 #Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD |
7 # |
8 # |
8 #See COPYING file for copyrights details. |
9 #See COPYING file for copyrights details. |
9 # |
10 # |
10 #This library is free software; you can redistribute it and/or |
11 #This library is free software; you can redistribute it and/or |
11 #modify it under the terms of the GNU Lesser General Public |
12 #modify it under the terms of the GNU General Public |
12 #License as published by the Free Software Foundation; either |
13 #License as published by the Free Software Foundation; either |
13 #version 2.1 of the License, or (at your option) any later version. |
14 #version 2.1 of the License, or (at your option) any later version. |
14 # |
15 # |
15 #This library is distributed in the hope that it will be useful, |
16 #This library is distributed in the hope that it will be useful, |
16 #but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 #but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
18 #Lesser General Public License for more details. |
19 #General Public License for more details. |
19 # |
20 # |
20 #You should have received a copy of the GNU Lesser General Public |
21 #You should have received a copy of the GNU General Public |
21 #License along with this library; if not, write to the Free Software |
22 #License along with this library; if not, write to the Free Software |
22 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 |
24 |
24 from types import * |
25 from types import * |
25 |
26 |
26 DicoTypes = {"BOOL":0x01, "SINT":0x02, "INT":0x03,"DINT":0x04,"LINT":0x10, |
27 DicoTypes = {"BOOL":0x01, "SINT":0x02, "INT":0x03,"DINT":0x04,"LINT":0x10, |
27 "USINT":0x05,"UINT":0x06,"UDINT":0x07,"ULINT":0x1B,"REAL":0x08, |
28 "USINT":0x05,"UINT":0x06,"UDINT":0x07,"ULINT":0x1B,"REAL":0x08, |