aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Utilities/Tango.MachineEM.UI/Views/MainView.xaml
blob: c0c4b7b9789d4e2ebd432e0c36163ebc7cfd7366 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
<UserControl x:Class="Tango.MachineEM.UI.Views.MainView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:controls="clr-namespace:Tango.MachineEM.UI.Controls"
             xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
             xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI"
             xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
             xmlns:fa="http://schemas.fontawesome.io/icons/"
             xmlns:vm="clr-namespace:Tango.MachineEM.UI.ViewModels"
             xmlns:pmr="clr-namespace:Tango.PMR.MachineStatus;assembly=Tango.PMR"
             xmlns:threadLoading="clr-namespace:Tango.PMR.ThreadLoading;assembly=Tango.PMR"
             xmlns:localConverters="clr-namespace:Tango.MachineEM.UI.Converters"
             xmlns:local="clr-namespace:Tango.MachineEM.UI.Views"
             mc:Ignorable="d" 
             d:DesignHeight="780" d:DesignWidth="1300" Foreground="Gainsboro" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" >

    <UserControl.Resources>
        <converters:BooleanInverseConverter x:Key="BooleanInverseConverter"></converters:BooleanInverseConverter>
        <converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter" />
        <localConverters:EventTypeToStringConverter x:Key="EventTypeToStringConverter" />
    </UserControl.Resources>
    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="../Images/circuit.jpg" Opacity="0.1" Stretch="UniformToFill"></ImageBrush>
        </Grid.Background>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="100"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>

            <Grid>
                <Grid.Effect>
                    <DropShadowEffect BlurRadius="10"/>
                </Grid.Effect>
                <Grid.Background>
                    <SolidColorBrush Color="#151515" Opacity="0.8" />
                </Grid.Background>
                <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Margin="20 15">
                    <Image Source="/Images/embedded-device.png" RenderOptions.BitmapScalingMode="Fant"></Image>
                    <TextBlock Text="Tango Embedded Emulator" VerticalAlignment="Center" Margin="20 0 0 0" FontSize="36" Foreground="Red">
                        <TextBlock.Effect>
                            <DropShadowEffect/>
                        </TextBlock.Effect>
                    </TextBlock>
                </StackPanel>
            </Grid>

            <Grid Grid.Row="1" Margin="20">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="70"/>
                    </Grid.RowDefinitions>

                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="220"/>
                            <ColumnDefinition Width="1*"/>
                            <ColumnDefinition Width="280"/>
                        </Grid.ColumnDefinitions>
                        <Grid Background="#A3000000">
                            <StackPanel>
                                <!--BUTTONS HERE-->
                                <Button Padding="10 0 0 0" Height="45" Margin="5" HorizontalContentAlignment="Left" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StartThreadLoadingCommand}">
                                    <StackPanel Orientation="Horizontal">
                                        <fa:ImageAwesome Icon="ChevronCircleDown" Width="16"></fa:ImageAwesome>
                                        <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">START THREAD LOADING</TextBlock>
                                    </StackPanel>
                                </Button>
                                <Button Padding="10 0 0 0" Height="45" Margin="5" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding FinalizeThreadLoadingCommand}">
                                    <StackPanel Orientation="Horizontal">
                                        <fa:ImageAwesome Icon="ChevronCircleUp" Width="16"></fa:ImageAwesome>
                                        <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">FINALIZE THREAD LOADING</TextBlock>
                                    </StackPanel>
                                </Button>
                                <Button Padding="10 0 0 0" Margin="5" Height="45" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ValidateCartridgeCommand}">
                                    <StackPanel Orientation="Horizontal">
                                        <fa:ImageAwesome Icon="FlagCheckered" Width="16"></fa:ImageAwesome>
                                        <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">CARTRIDGE VALIDATION</TextBlock>
                                    </StackPanel>
                                </Button>
                                <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleLevels" Height="45" Margin="5">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">MACHINE STATUS</TextBlock>
                                        <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome>
                                    </StackPanel>
                                </ToggleButton>
                                <Popup IsOpen="{Binding ElementName=toggleLevels,Path=IsChecked}" StaysOpen="True">
                                    <Border Padding="10">
                                        <StackPanel Orientation="Horizontal">
                                            <StackPanel HorizontalAlignment="Left">
                                                <TextBlock Foreground="Red">IDS Packs Levels</TextBlock>
                                                <ScrollViewer Height="400" HorizontalScrollBarVisibility="Disabled" Width="300">
                                                    <ItemsControl Margin="0 5 0 0" ItemsSource="{Binding Emulator.MachineStatus.IDSPacksLevels}">
                                                        <ItemsControl.ItemTemplate>
                                                            <DataTemplate>
                                                                <StackPanel Margin="0 5">
                                                                    <TextBlock>
                                                <Run Text="Index: "></Run>
                                                <Run Text="{Binding Index}"></Run>
                                                                    </TextBlock>

                                                                    <StackPanel Orientation="Horizontal">
                                                                        <TextBlock Text="Dispenser Level (nl): " />
                                                                        <TextBox Text="{Binding ElementName=sliderDispenser,Path=Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"></TextBox>
                                                                    </StackPanel>

                                                                    <Slider x:Name="sliderDispenser" Orientation="Horizontal" Minimum="0" Maximum="130000000" Value="{Binding DispenserLevel}"></Slider>

                                                                    <TextBlock>
                                                <Run Text="MidTank Level (ml): "></Run>
                                                <Run Text="{Binding ElementName=sliderMidTank,Path=Value}"></Run>
                                                                    </TextBlock>

                                                                    <Slider x:Name="sliderMidTank" Orientation="Horizontal" Minimum="0" Maximum="1.8" Value="{Binding MidTankLevel}"></Slider>
                                                                </StackPanel>
                                                            </DataTemplate>
                                                        </ItemsControl.ItemTemplate>
                                                    </ItemsControl>
                                                </ScrollViewer>
                                            </StackPanel>
                                            <StackPanel Margin="10 0 0 0">
                                                <TextBlock Foreground="Red">MACHINE STATE</TextBlock>
                                                <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:MachineState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.State,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>

                                                <TextBlock Margin="0 20 0 0" Foreground="Red" Width="160">
                                                <Run>OVERALL TEMPERATURE</Run>
                                                <Run Text="{Binding ElementName=sliderTemperature,Path=Value,StringFormat='0.0',Mode=OneWay}"></Run>
                                                </TextBlock>
                                                <Slider x:Name="sliderTemperature" Margin="0 5 0 0" Minimum="0" Maximum="60" Value="{Binding Emulator.MachineStatus.OverallTemperature,Mode=TwoWay}"></Slider>

                                                <TextBlock Margin="0 10 0 0">SPOOL STATE</TextBlock>
                                                <ComboBox Margin="0 5 0 0" Width="150" ItemsSource="{Binding Source={x:Type pmr:SpoolState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding Emulator.MachineStatus.SpoolState,Mode=TwoWay}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
                                            </StackPanel>
                                        </StackPanel>
                                    </Border>
                                </Popup>

                                <ToggleButton Style="{StaticResource AccentedSquareButtonStyle}" BorderThickness="0" x:Name="toggleIFS" Height="45" Margin="5">
                                    <StackPanel Orientation="Horizontal">
                                        <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">INK FILLING STATUS</TextBlock>
                                        <fa:ImageAwesome Icon="ChevronDown" Width="16" Foreground="White"></fa:ImageAwesome>
                                    </StackPanel>
                                </ToggleButton>
                                <Popup IsOpen="{Binding ElementName=toggleIFS,Path=IsChecked}" StaysOpen="True" PlacementTarget="{Binding ElementName=toggleIFS}" Placement="Bottom">
                                    <controls:InkFillingStatusView Height="300" Width="210" DataContext="{Binding Emulator.InkFillingStatus}" />
                                </Popup>

                                <Button Padding="10 0 0 0" Margin="5" Height="45" HorizontalContentAlignment="Left" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding AbortJobCommand}">
                                    <DockPanel>
                                        <fa:ImageAwesome Icon="ExclamationTriangle" Width="16"></fa:ImageAwesome>
                                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">ABORT JOB</TextBlock>
                                    </DockPanel>
                                </Button>

                                <Button Padding="10 0 0 0" Margin="5" HorizontalContentAlignment="Left" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding PerformDataStoreTestCommand}">
                                    <DockPanel>
                                        <fa:ImageAwesome Icon="Database" Width="16"></fa:ImageAwesome>
                                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">DATASTORE TEST</TextBlock>
                                    </DockPanel>
                                </Button>

                                <Button Padding="10 0 0 0" Margin="5" HorizontalContentAlignment="Left" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding GetDataStoreItemCommand}">
                                    <DockPanel>
                                        <fa:ImageAwesome Icon="Download" Width="16"></fa:ImageAwesome>
                                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">GET DATA STORE ITEM</TextBlock>
                                    </DockPanel>
                                </Button>

                                <Button HorizontalContentAlignment="Left" Padding="10 0 0 0" Margin="5" Height="45" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding PutDataStoreItemCommand}">
                                    <DockPanel>
                                        <fa:ImageAwesome Icon="Upload" Width="16"></fa:ImageAwesome>
                                        <TextBlock Margin="10 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Center">PUT DATA STORE ITEM</TextBlock>
                                    </DockPanel>
                                </Button>
                                <!--BUTTONS HERE-->

                                <DockPanel Margin="5 20 5 0">
                                <TextBlock FontSize="12" DockPanel.Dock="Top">Thread Loading State</TextBlock>
                                <ComboBox Margin="0 5 0 0" ItemsSource="{Binding Source={x:Type threadLoading:ThreadLoadingState},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedValue="{Binding ThreadLoadingState,Mode=OneWayToSource}" SelectedValuePath="Value" DisplayMemberPath="DisplayName"></ComboBox>
                                </DockPanel>
                            </StackPanel>
                        </Grid>
                        <TextBox x:Name="txtLog" Grid.Column="1" FontFamily="monospaced" TextChanged="txtLog_TextChanged" Text="{Binding Log}" Background="Transparent" Foreground="Red" FontSize="11" Padding="5" Style="{x:Null}" BorderThickness="0" IsReadOnly="True" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap">

                        </TextBox>

                        <Grid Grid.Column="2">
                            <DockPanel>
                                <TextBlock DockPanel.Dock="Top" Margin="10 0 0 0">HARDWARE EVENTS</TextBlock>
                                <ListBox BorderThickness="0" Background="#66000000" Margin="10 10 10 0" ItemsSource="{Binding Emulator.EventsStates}" FontSize="11">
                                    <ListBox.ItemContainerStyle>
                                        <Style TargetType="ListBoxItem">

                                        </Style>
                                    </ListBox.ItemContainerStyle>
                                    <ListBox.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox FontSize="11" Content="{Binding EventType,Converter={StaticResource EventTypeToStringConverter}}" IsChecked="{Binding IsActive}" Margin="5"></CheckBox>
                                        </DataTemplate>
                                    </ListBox.ItemTemplate>
                                </ListBox>
                            </DockPanel>
                        </Grid>
                    </Grid>

                    <Grid x:Name="gridContent" Background="#151515" Margin="5" Visibility="Hidden">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="300" />
                                <ColumnDefinition Width="1*"/>
                            </Grid.ColumnDefinitions>

                            <Grid Background="#181818">
                                <Grid Margin="10 0 10 0">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="40"/>
                                        <RowDefinition Height="346*"/>
                                        <RowDefinition Height="70"/>
                                    </Grid.RowDefinitions>

                                    <TextBlock VerticalAlignment="Center" FontSize="16" Foreground="#BB1404" FontWeight="Bold">STUBS</TextBlock>

                                    <ListBox Grid.Row="1" ItemsSource="{Binding AvailableStubs}" SelectedItem="{Binding SelectedAvailableStub}" SelectedIndex="-1">
                                        <ListBox.ItemTemplate>
                                            <DataTemplate>
                                                <Grid>
                                                    <StackPanel Orientation="Horizontal" Margin="2 10 0 10">
                                                        <fa:ImageAwesome Icon="Cogs" Foreground="Gray" Width="24" Height="24" VerticalAlignment="Center"></fa:ImageAwesome>
                                                        <StackPanel Margin="5 0 0 0" VerticalAlignment="Center">
                                                            <TextBlock Margin="2" FontSize="14" Text="{Binding Name}"></TextBlock>
                                                            <TextBlock Margin="2" FontSize="12" Text="{Binding Description}"></TextBlock>
                                                        </StackPanel>
                                                    </StackPanel>
                                                    <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Stroke="Black" StrokeThickness="1"></Rectangle>
                                                </Grid>
                                            </DataTemplate>
                                        </ListBox.ItemTemplate>
                                    </ListBox>

                                    <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ClearCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Refresh" Foreground="Gainsboro" Width="24"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding CancelCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Stop" Foreground="Red" Width="24"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                        <Button Cursor="Hand" Width="50" Height="50" VerticalAlignment="Center" Style="{DynamicResource MetroCircleButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding RunCommand}">
                                            <StackPanel Orientation="Horizontal">
                                                <fa:ImageAwesome Icon="Play" Width="24" Foreground="LimeGreen"></fa:ImageAwesome>
                                            </StackPanel>
                                        </Button>
                                    </StackPanel>
                                </Grid>
                            </Grid>

                            <Grid Grid.Column="1">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="107*"/>
                                        <RowDefinition Height="60*"/>
                                    </Grid.RowDefinitions>

                                    <Grid>
                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="200"/>
                                            <ColumnDefinition Width="1*"/>
                                        </Grid.ColumnDefinitions>

                                        <Grid>
                                            <GroupBox Header="PARAMETERS" Padding="5">
                                                <Grid Background="#252525">
                                                    <editors:ParameterizedEditor ParameterizedObject="{Binding SelectedStub}" ItemMargin="10" ItemLabelMargin="0 0 0 5" />
                                                </Grid>
                                            </GroupBox>
                                        </Grid>
                                    </Grid>

                                    <Grid Grid.Row="1">
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="30"/>
                                            <RowDefinition Height="1*"/>
                                        </Grid.RowDefinitions>

                                        <Border Background="#202020" Padding="5" CornerRadius="10 0 0 10">
                                            <TextBlock FontSize="16" VerticalAlignment="Center">LOG</TextBlock>
                                        </Border>

                                        <Grid Grid.Row="1">
                                            <TextBox x:Name="txtResponse" IsReadOnly="True" TextChanged="txtResponse_TextChanged" Text="{Binding Log}" Background="Black" AcceptsReturn="True" TextWrapping="Wrap" VerticalScrollBarVisibility="Visible" BorderThickness="0" Padding="5" FontSize="11" Foreground="Gainsboro"></TextBox>
                                        </Grid>
                                    </Grid>
                                </Grid>
                            </Grid>
                        </Grid>
                    </Grid>
                    <Grid x:Name="gridActions" Grid.Row="1" Margin="5">
                        <Grid.Effect>
                            <DropShadowEffect BlurRadius="10" />
                        </Grid.Effect>
                        <Grid.Background>
                            <SolidColorBrush Color="#151515" Opacity="0.8" />
                        </Grid.Background>
                        <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" Margin="5">
                            <CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.EmulateCorruption}" Foreground="Red">Emulate Corruption</CheckBox>
                            <CheckBox Margin="0 0 20 0" VerticalAlignment="Center" IsChecked="{Binding Emulator.PerformNativeRoundTrip}">Perform Native RoundTrip</CheckBox>
                            <ComboBox IsEnabled="{Binding Emulator.IsStarted,Converter={StaticResource BooleanInverseConverter}}" MinWidth="140" Margin="5" BorderThickness="0" ItemsSource="{Binding Ports}" SelectedItem="{Binding SelectedPort}"></ComboBox>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding ClearCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Refresh" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">CLEAR</TextBlock>
                                </StackPanel>
                            </Button>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StopCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Stop" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">STOP</TextBlock>
                                </StackPanel>
                            </Button>
                            <Button Margin="5" MinWidth="100" Style="{StaticResource AccentedSquareButtonStyle}" mahapps:ButtonHelper.PreserveTextCase="True" BorderThickness="0" Command="{Binding StartCommand}">
                                <StackPanel Orientation="Horizontal">
                                    <fa:ImageAwesome Icon="Play" Width="16"></fa:ImageAwesome>
                                    <TextBlock VerticalAlignment="Center" Margin="10 0 10 0">START</TextBlock>
                                </StackPanel>
                            </Button>
                        </StackPanel>
                    </Grid>
                </Grid>
            </Grid>
        </Grid>
    </Grid>
</UserControl>
pan> enum { HEAD_TYPE_UNKNOWN, HEAD_TYPE_SYLKO_WITHOUT_CARD, HEAD_TYPE_UNKNOWN_WITH_CARD, HEAD_TYPE_SYLKO, HEAD_TYPE_STAPLE_SPUN, }HEAD_TYPE; extern uint8_t Head_Type; //WHS types typedef enum { WHS_TYPE_UNKNOWN, WHS_TYPE_NEW, }WHS_TYPE; extern uint8_t WHS_Type; extern uint8_t SmallFansCfg; extern uint8_t LargeFansCfg; bool Is_PP_Machine(void); typedef enum { DISP_TYPE_UNKNOWN, DISP_TYPE_WITHOUT_EEPROM, DISP_TYPE_EEPROM32KB, DISP_TYPE_EEPROM128KB, }DISP_TYPE; typedef enum { DEFAULT_POLARITY = 0,//OPTIC_LS , MAGNETIC_LS CARD 2 INVERSION_POLARITY = 1,//MAGNETIC_LS CARD 2 - must be 1 used for xor the polarity }LS_POLARITY; typedef enum { LS_STATUS_OK = 0, LS_STATUS_ERROR = 1, }LS_STATUS; typedef enum { HEAD_FAN_RIGHT, HEAD_FAN_LEFT, MAX_HEAD_FAN, }HEAD_FAN_ENUM; typedef enum { OPEN_MAGNET, CLOSE_MAGNET, DISABLE_MAGNET }MAGNET_COMMAND_ENUM; /* typedef union { struct { uint32_t SN; //0-4 uint8_t Version; //5 uint8_t Content; //6 uint8_t Location ; //7 uint8_t Life_Time ; //8 uint32_t Calibration ; //9-12 uint32_t Spare ; //13-15 }bytes; uint8_t Buf[16]; }DISP_EEPROM; */ /* //////////////////////////////////////////// typedef struct { uint32_t SN; uint32_t Batch_Productions_data; uint32_t Production_date; uint32_t Dispenser_Part_Number; uint32_t PCB_Serial; uint32_t PCB_Version; }DISPENSER_DATA; typedef struct { float Humidity; float Temperature; }DISPENSER_TEST_AMBIENT; typedef struct { uint16_t Current; uint16_t Batch; }DISPENSER_COLOR; typedef struct { float Calibration0; float Calibration1; }DISPENSER_CALIBRATION_TABLE; typedef struct { DISPENSER_DATA Dispebser_Data; uint32_t Calibration_Test_Date ; uint32_t ATS_location_Slot ; uint32_t Nl_Pulse_Value ; uint32_t Flow_Pass_Fail ; DISPENSER_CALIBRATION_TABLE Calibration_table; uint32_t Test_TI_Batch; DISPENSER_COLOR Color; DISPENSER_TEST_AMBIENT Test_Ambient; uint32_t Total_Cycles_Working_Time; uint32_t Spare[5]; }DISP_EEPROM_BYTES; */ #define MAX_SYSTEM_DISPENSERS 8 typedef struct { uint32_t Header; uint32_t Table_Length; uint32_t Table_version; uint8_t Dispenser_Part_Number[20];//String uint8_t PCB_SN[20];//String uint8_t PCB_Part_Number[20];//String uint8_t Dispenser_SN[20];//String int32_t Minimal_Pressure; int32_t Maximal_Pressure; int32_t Minimal_MV; int32_t Maximal_MV; uint32_t Total_Cycles; uint32_t Bubble_Size; uint32_t AVG_Nl_Step_Value_1_4; uint32_t AVG_Nl_Step_Value_2_4; uint32_t AVG_Nl_Step_Value_3_4; uint32_t AVG_Nl_Step_Value_4_4; uint32_t SW_Reserve; int32_t Spare1_pressure; int32_t Spare2_pressure; uint32_t Motor_PPC; uint32_t color; uint32_t Pressure_Slope; uint8_t Production_Test_Date[8];//string uint32_t ATS_Location; uint32_t ATS_Channel; uint32_t Spare1; uint32_t Spare2; uint8_t Unit_Empty; uint8_t Dry_Run_Status; uint8_t Flow_Status; uint8_t CheckSum; }DISP_EEPROM_BYTES; typedef union { DISP_EEPROM_BYTES bytes; uint8_t Buf[sizeof(DISP_EEPROM_BYTES)]; }DISP_EEPROM; //////////////////////////////////////////// typedef struct { DISP_TYPE Type; LS_POLARITY LS_Polarity; DISP_EEPROM Write_Disp_EEPROM; DISP_EEPROM Read_Disp_EEPROM; LS_STATUS Status; }DISP; DISP Dispenser_struct[8]; //SPI typedef struct //S_SPI { //unsigned char MotID; //- TODO to remove this field unsigned int TX_MOSI; //32bit (Master Output Slave Input ) unsigned int RX_MISO; //24bit (Master Input Slave Output) //unsigned int BUSY; //32bit unsigned char AMT_OF_Words:3; //The amount of spi words (usually byte sized) per transmission (send 4 to 32bit) }SPI;//SPI #define SSI_SPI_TIMEOUT 1000 extern void *my_malloc(size_t _size); extern void my_free(void *_ptr); extern uint32_t msec_millisecondCounter; //--------------------------------------------------------------------- #pragma diag_suppress 169 /* Avoid warnings on VOID * conversions (protobuf issue) The warning: #169-D argument of type "size_t (*)(const CalculateResponse *, uint8_t *)" is incompatible with parameter of type "size_t (*)(void *, uint8_t *)" Calculate.c /twine_usblib_demo/PMR/Stubs line 53 C/C++ Problem //#pragma diag_suppress 190 // Avoid the warning - #190-D enumerated type mixed with another type protobuf-c.c * or in the environment add command line: Project -> properties -> Press on show advanced settings CCS Build -> Advanced Options -> Diagnistic Options -> Add the warning number in Supports diagnostic <id> (--diag_suppress, - pds) 169 190 */ //Project Properties->Build->Compiler->Include Options //There may be paths there relative to a build variable, rather than hard-coded paths, that may be triggering the error. //machine 2 only!!!!!!!!!!! //#define HEAD6_PT100 TEMP_SENSE_ANALOG_MIXCHIP_TEMP //#define MIXER_PT100 TEMP_SENSE_AN_ENCLOSURETEMP3 //machine 2 only!!!!!!!!!!! #define HEAD6_PT100 TEMP_SENSE_AN_ENCLOSURETEMP3 #define MIXER_PT100 TEMP_SENSE_ANALOG_MIXCHIP_TEMP #define LUBRICANT_DISPENSER 7 #define CLEANER_DISPENSER 6 //#define AUTO_HOME_DISPENSERS #define MAX_CARTRIDGES 3 typedef enum { MIDTANK_1, MIDTANK_2, MIDTANK_3, MIDTANK_4, MIDTANK_5, MIDTANK_6, MIDTANK_7, MIDTANK_8, NUM_OF_MIDTANKS, } MidTank_t; extern PackageHandle ControlFilter; extern PackageHandle HeatersFilter; extern PackageHandle JobFilter ; extern PackageHandle WasteFilter ; extern PackageHandle AlarmFilter ; extern PackageHandle DiagnosticsFilter; extern PackageHandle IDSFilter; extern PackageHandle ThreadFilter; extern PackageHandle GeneralFilter; extern PackageHandle CommFilter; extern PackageHandle FPGAFilter; extern PackageHandle LoadFilter; extern PackageHandle InitFilter; extern PackageHandle MaintFilter; #ifndef max #define max(a,b) ((a) > (b) ? (a) : (b)) #endif #ifndef min #define min(a,b) ((a) < (b) ? (a) : (b)) #endif #endif /* DATADEF_H */