WePanel Class Reference
| Inherits from | WeView : UIControl |
| Declared in | WePanel.h WePanel.m |
Overview
A container for UIViews can automatically layout its contents using a variety of layout strategies.
Subviews are added in layers (WePanelLayer).
See: WePanelLayer, WePanelLayout.
Tasks
Other Methods
-
layers
property -
debugLayout
A debugging flag.
property -
minSize
A minimum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatFits:].
property -
maxSize
A maximum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatfits:].
property -
+ create
Factory method.
-
+ createWithStretch
Factory method.
-
+ createWithToolbarBackground
Factory method.
-
+ createSpacer:
Factory method.
-
+ createFill1:
Create a new WePanel and adds a single UIView in a fill layer.
-
+ createFillNatural1:
Create a new WePanel and adds a single UIView in a natural fill layer.
-
+ createCenter1:
Create a new WePanel and adds a single UIView in a center layer.
-
+ createHorizontal1:
Create a new WePanel and adds a single UIView in a horizontal layer.
-
+ createVertical1:
Create a new WePanel and adds a single UIView in a vertical layer.
-
+ createHorizontalFill:
Create a new WePanel and adds UIViews in a horizontal fill layer.
-
+ createVerticalFill:
Create a new WePanel and adds UIViews in a vertical fill layer.
-
+ createHorizontal:
Create a new WePanel and adds UIViews in a horizontal layer.
-
+ createVertical:
Create a new WePanel and adds UIViews in a vertical layer.
-
– layoutContents
Lays out its contents.
-
– sizeThatFits:
Return the “natural” size of the contents of this panel within the context of a given size.
-
– addLayer:
Add a layer.
-
– removeLayer:
Add a layer.
-
– addToolbarBackground
Add a toolbar background as a layer.
-
– clearWithPurge
Removes all of the panel’s contents, purging them if possible.
-
– clearWithoutPurge
Removes all of the panel’s contents without purging them.
-
– setBounds:
If the panel’s size is changed, its contents are re-layed out.
-
– setBoundsWithoutLayout:
Changes the panel’s bounds without layout of its contents.
-
– setFrame:
If the panel’s size is changed, its contents are re-layed out.
-
– setFrameWithoutLayout:
Changes the panel’s frame without layout of its contents.
-
– addFill1:
Adds a single UIView in a fill layer.
-
– addFill:
Adds UIViews in a fill layer.
-
– addFillNatural1:
Adds a single UIView in a natural fill layer.
-
– addFillNatural:
Adds UIViews in a natural fill layer.
-
– addCenter1:
Adds a single UIView in a center layer.
-
– addCenter:
Adds UIViews in a center layer.
-
– addSpacingGrid:columnCount:uniformGrid:
Adds UIViews in a spacing grid layer.
-
– addSpacingGrid:rowCount:uniformGrid:
Adds UIViews in a spacing grid layer.
-
– addNaturalGrid:columnCount:uniformGrid:
Adds UIViews in a natural grid layer.
-
– addNaturalGrid:rowCount:uniformGrid:
Adds UIViews in a natural grid layer.
-
– addFillGrid:columnCount:uniformGrid:
Adds UIViews in a fill grid layer.
-
– addFillGrid:rowCount:uniformGrid:
Adds UIViews in a fill grid layer.
-
– addEvenFillGrid:columnCount:cellSizeHint:
Adds UIViews in an even fill grid layer.
-
– addEvenFillGrid:rowCount:cellSizeHint:
Adds UIViews in an even fill grid layer.
-
– addTextWrap:
Adds UIViews in a text wrap layer.
-
– addManual:
Adds UIViews in a manual layer.
-
– addHorizontal1:
Adds a single UIView in a horizontal layer.
-
– addHorizontal:
Adds UIViews in a horizontal layer.
-
– addHorizontalFill1:
Adds a single UIView in a horizontal fill layer.
-
– addHorizontalFill:
Adds UIViews in a horizontal fill layer.
-
– addVertical1:
Adds a single UIView in a vertical layer.
-
– addVertical:
Adds UIViews in a vertical layer.
-
– addVerticalFill1:
Adds a single UIView in a vertical fill layer.
-
– addVerticalFill:
Adds UIViews in a vertical fill layer.
-
– updateHMargin:vMargin:
Sets the horizontal and vertical margin of all layers in this panel.
-
– updateHAlign:vAlign:
Sets the horizontal and vertical alignment of all layers in this panel.
-
– withMinSize:
Sets the minimum natural size of this view.
-
– withMaxSize:
Sets the maximum natural size of this view.
-
– withFixedSize:
Sets a fixed natural size of this view.
-
– withEmptyNaturalSize
If invoked, the “natural” size returned by [UIView sizeThatFits:] is zero.
-
– setMinWidth:
Sets the minimum width hint.
-
– setMinHeight:
Sets the minimum height hint.
-
– setMaxWidth:
Sets the maximum width hint.
-
– setMaxHeight:
Sets the maximum height hint.
-
– setFixedWidth:
Sets the maximum and minimum width hints.
-
– setFixedHeight:
Sets the maximum and minimum height hints.
-
– getNonLayerSubviews
All subviews which are not associated with a layer.
Other Methods
Properties
debugLayout
A debugging flag.
@property (nonatomic, assign) BOOL debugLayout
Discussion
A debugging flag.
Declared In
WePanel.h
maxSize
A maximum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatfits:].
@property (nonatomic, assign) CGSize maxSize
Discussion
A maximum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatfits:].
Declared In
WePanel.h
minSize
A minimum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatFits:].
@property (nonatomic, assign) CGSize minSize
Discussion
A minimum size hint used calculating the “natural” size for this view returned by [WePanel sizeThatFits:].
Declared In
WePanel.h
Class Methods
create
Factory method.
+ (WePanel *)create
Return Value
A WePanel.
Discussion
Factory method.
Declared In
WePanel.h
createCenter1:
Create a new WePanel and adds a single UIView in a center layer.
+ (WePanel *)createCenter1:(UIView *)view
Parameters
- view
the UIView.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds a single UIView in a center layer.
Declared In
WePanel.h
createFill1:
Create a new WePanel and adds a single UIView in a fill layer.
+ (WePanel *)createFill1:(UIView *)view
Parameters
- view
the UIView.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds a single UIView in a fill layer.
Declared In
WePanel.h
createFillNatural1:
Create a new WePanel and adds a single UIView in a natural fill layer.
+ (WePanel *)createFillNatural1:(UIView *)view
Parameters
- view
the UIView.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds a single UIView in a natural fill layer.
Declared In
WePanel.h
createHorizontal1:
Create a new WePanel and adds a single UIView in a horizontal layer.
+ (WePanel *)createHorizontal1:(UIView *)view
Parameters
- view
the UIView.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds a single UIView in a horizontal layer.
Declared In
WePanel.h
createHorizontal:
Create a new WePanel and adds UIViews in a horizontal layer.
+ (WePanel *)createHorizontal:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds UIViews in a horizontal layer.
Declared In
WePanel.h
createHorizontalFill:
Create a new WePanel and adds UIViews in a horizontal fill layer.
+ (WePanel *)createHorizontalFill:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds UIViews in a horizontal fill layer.
Declared In
WePanel.h
createSpacer:
Factory method.
+ (WePanel *)createSpacer:(CGSize)minSize
Parameters
- minSize
The minimum size hint.
Return Value
A WePanel.
Discussion
Factory method.
Creates an empty WePanel with a given minimum size.
See WeSpacer and WeSpacingProxy.
Declared In
WePanel.h
createVertical1:
Create a new WePanel and adds a single UIView in a vertical layer.
+ (WePanel *)createVertical1:(UIView *)view
Parameters
- view
the UIView.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds a single UIView in a vertical layer.
Declared In
WePanel.h
createVertical:
Create a new WePanel and adds UIViews in a vertical layer.
+ (WePanel *)createVertical:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds UIViews in a vertical layer.
Declared In
WePanel.h
createVerticalFill:
Create a new WePanel and adds UIViews in a vertical fill layer.
+ (WePanel *)createVerticalFill:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanel.
Discussion
Create a new WePanel and adds UIViews in a vertical fill layer.
Declared In
WePanel.h
createWithStretch
Factory method.
+ (WePanel *)createWithStretch
Return Value
A WePanel.
Discussion
Factory method.
Sets the stretchWeight to 1.0f, the default value for stretching views.
Declared In
WePanel.h
createWithToolbarBackground
Factory method.
+ (WePanel *)createWithToolbarBackground
Return Value
A WePanel.
Discussion
Factory method.
Adds a UIToolbar as a layer.
Declared In
WePanel.h
Instance Methods
addCenter1:
Adds a single UIView in a center layer.
- (WePanelLayer *)addCenter1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a center layer.
Declared In
WePanel.h
addCenter:
Adds UIViews in a center layer.
- (WePanelLayer *)addCenter:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a center layer.
Center layers usually only have one item. See [WePanel addCenter1:].
Declared In
WePanel.h
addEvenFillGrid:columnCount:cellSizeHint:
Adds UIViews in an even fill grid layer.
- (WePanelLayer *)addEvenFillGrid:(NSArray *)items columnCount:(int)columnCount cellSizeHint:(CGSize)cellSizeHint
Parameters
- items
the UIViews.
- columnCount
the column count.
- cellSizeHint
the cell size hint.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in an even fill grid layer.
Declared In
WePanel.h
addEvenFillGrid:rowCount:cellSizeHint:
Adds UIViews in an even fill grid layer.
- (WePanelLayer *)addEvenFillGrid:(NSArray *)items rowCount:(int)rowCount cellSizeHint:(CGSize)cellSizeHint
Parameters
- items
the UIViews.
- rowCount
the row count.
- cellSizeHint
the cell size hint.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in an even fill grid layer.
Declared In
WePanel.h
addFill1:
Adds a single UIView in a fill layer.
- (WePanelLayer *)addFill1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a fill layer.
Declared In
WePanel.h
addFill:
Adds UIViews in a fill layer.
- (WePanelLayer *)addFill:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a fill layer.
Fill layers usually only have one item. See [WePanel addFill1:].
Declared In
WePanel.h
addFillGrid:columnCount:uniformGrid:
Adds UIViews in a fill grid layer.
- (WePanelLayer *)addFillGrid:(NSArray *)items columnCount:(int)columnCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- columnCount
the column count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a fill grid layer.
Declared In
WePanel.h
addFillGrid:rowCount:uniformGrid:
Adds UIViews in a fill grid layer.
- (WePanelLayer *)addFillGrid:(NSArray *)items rowCount:(int)rowCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- rowCount
the row count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a fill grid layer.
Declared In
WePanel.h
addFillNatural1:
Adds a single UIView in a natural fill layer.
- (WePanelLayer *)addFillNatural1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a natural fill layer.
Declared In
WePanel.h
addFillNatural:
Adds UIViews in a natural fill layer.
- (WePanelLayer *)addFillNatural:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a natural fill layer.
Natural fill layers usually only have one item. See [WePanel addFillNatural1:].
Declared In
WePanel.h
addHorizontal1:
Adds a single UIView in a horizontal layer.
- (WePanelLayer *)addHorizontal1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a horizontal layer.
Declared In
WePanel.h
addHorizontal:
Adds UIViews in a horizontal layer.
- (WePanelLayer *)addHorizontal:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a horizontal layer.
Declared In
WePanel.h
addHorizontalFill1:
Adds a single UIView in a horizontal fill layer.
- (WePanelLayer *)addHorizontalFill1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a horizontal fill layer.
Declared In
WePanel.h
addHorizontalFill:
Adds UIViews in a horizontal fill layer.
- (WePanelLayer *)addHorizontalFill:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a horizontal fill layer.
Declared In
WePanel.h
addLayer:
Add a layer.
- (WePanelLayer *)addLayer:(WePanelLayer *)value
Parameters
- value
The WePanelLayer.
Return Value
The same WePanelLayer, for chaining.
Discussion
Add a layer.
Declared In
WePanel.h
addManual:
Adds UIViews in a manual layer.
- (WePanelLayer *)addManual:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a manual layer.
Declared In
WePanel.h
addNaturalGrid:columnCount:uniformGrid:
Adds UIViews in a natural grid layer.
- (WePanelLayer *)addNaturalGrid:(NSArray *)items columnCount:(int)columnCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- columnCount
the column count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a natural grid layer.
Declared In
WePanel.h
addNaturalGrid:rowCount:uniformGrid:
Adds UIViews in a natural grid layer.
- (WePanelLayer *)addNaturalGrid:(NSArray *)items rowCount:(int)rowCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- rowCount
the row count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a natural grid layer.
Declared In
WePanel.h
addSpacingGrid:columnCount:uniformGrid:
Adds UIViews in a spacing grid layer.
- (WePanelLayer *)addSpacingGrid:(NSArray *)items columnCount:(int)columnCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- columnCount
the column count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a spacing grid layer.
Declared In
WePanel.h
addSpacingGrid:rowCount:uniformGrid:
Adds UIViews in a spacing grid layer.
- (WePanelLayer *)addSpacingGrid:(NSArray *)items rowCount:(int)rowCount uniformGrid:(BOOL)uniformGrid
Parameters
- items
the UIViews.
- rowCount
the row count.
- uniformGrid
the uniform grid value.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a spacing grid layer.
Declared In
WePanel.h
addTextWrap:
Adds UIViews in a text wrap layer.
- (WePanelLayer *)addTextWrap:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a text wrap layer.
Declared In
WePanel.h
addToolbarBackground
Add a toolbar background as a layer.
- (WePanel *)addToolbarBackground
Return Value
Itself, for chaining.
Discussion
Add a toolbar background as a layer.
Declared In
WePanel.h
addVertical1:
Adds a single UIView in a vertical layer.
- (WePanelLayer *)addVertical1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a vertical layer.
Declared In
WePanel.h
addVertical:
Adds UIViews in a vertical layer.
- (WePanelLayer *)addVertical:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a vertical layer.
Declared In
WePanel.h
addVerticalFill1:
Adds a single UIView in a vertical fill layer.
- (WePanelLayer *)addVerticalFill1:(UIView *)value
Parameters
- value
the UIView.
Return Value
The WePanelLayer.
Discussion
Adds a single UIView in a vertical fill layer.
Declared In
WePanel.h
addVerticalFill:
Adds UIViews in a vertical fill layer.
- (WePanelLayer *)addVerticalFill:(NSArray *)items
Parameters
- items
the UIViews.
Return Value
The WePanelLayer.
Discussion
Adds UIViews in a vertical fill layer.
Declared In
WePanel.h
clearWithPurge
Removes all of the panel’s contents, purging them if possible.
- (void)clearWithPurge
Discussion
Removes all of the panel’s contents, purging them if possible.
See: [WeBaseObject purge].
Declared In
WePanel.h
clearWithoutPurge
Removes all of the panel’s contents without purging them.
- (void)clearWithoutPurge
Declared In
WePanel.h
getNonLayerSubviews
All subviews which are not associated with a layer.
- (NSArray *)getNonLayerSubviews
Return Value
All subviews which are not associated with a layer.
Declared In
WePanel.h
layoutContents
Lays out its contents.
- (void)layoutContents
Discussion
Lays out its contents.
This method is called automatically when the size of the panel is changed with the [WePanel setFrame:] or [WePanel setBounds:] methods.
Declared In
WePanel.h
purge
See [WeBaseObject purge].
- (void)purge
Discussion
See [WeBaseObject purge].
Declared In
WeView.h
removeLayer:
Add a layer.
- (void)removeLayer:(WePanelLayer *)layer
Parameters
- layer
The WePanelLayer.
Discussion
Add a layer.
Declared In
WePanel.h
setBounds:
If the panel’s size is changed, its contents are re-layed out.
- (void)setBounds:(CGRect)value
Parameters
- value
The UIView’s new bounds.
Discussion
If the panel’s size is changed, its contents are re-layed out.
Declared In
WePanel.h
setBoundsWithoutLayout:
Changes the panel’s bounds without layout of its contents.
- (void)setBoundsWithoutLayout:(CGRect)value
Parameters
- value
The UIView’s new bounds.
Discussion
Changes the panel’s bounds without layout of its contents.
Declared In
WePanel.h
setFixedHeight:
Sets the maximum and minimum height hints.
- (WePanel *)setFixedHeight:(int)value
Parameters
- value
The height value.
Return Value
Itself, for chaining.
Discussion
Sets the maximum and minimum height hints.
Declared In
WePanel.h
setFixedWidth:
Sets the maximum and minimum width hints.
- (WePanel *)setFixedWidth:(int)value
Parameters
- value
The width value.
Return Value
Itself, for chaining.
Discussion
Sets the maximum and minimum width hints.
Declared In
WePanel.h
setFrame:
If the panel’s size is changed, its contents are re-layed out.
- (void)setFrame:(CGRect)value
Parameters
- value
The UIView’s new frame.
Discussion
If the panel’s size is changed, its contents are re-layed out.
Declared In
WePanel.h
setFrameWithoutLayout:
Changes the panel’s frame without layout of its contents.
- (void)setFrameWithoutLayout:(CGRect)value
Parameters
- value
The UIView’s new frame.
Discussion
Changes the panel’s frame without layout of its contents.
Declared In
WePanel.h
setMaxHeight:
Sets the maximum height hint.
- (WePanel *)setMaxHeight:(int)value
Parameters
- value
The maximum height value.
Return Value
Itself, for chaining.
Discussion
Sets the maximum height hint.
Declared In
WePanel.h
setMaxWidth:
Sets the maximum width hint.
- (WePanel *)setMaxWidth:(int)value
Parameters
- value
The maximum width value.
Return Value
Itself, for chaining.
Discussion
Sets the maximum width hint.
Declared In
WePanel.h
setMinHeight:
Sets the minimum height hint.
- (WePanel *)setMinHeight:(int)value
Parameters
- value
The minimum height value.
Return Value
Itself, for chaining.
Discussion
Sets the minimum height hint.
Declared In
WePanel.h
setMinWidth:
Sets the minimum width hint.
- (WePanel *)setMinWidth:(int)value
Parameters
- value
The minimum width value.
Return Value
Itself, for chaining.
Discussion
Sets the minimum width hint.
Declared In
WePanel.h
sizeThatFits:
Return the “natural” size of the contents of this panel within the context of a given size.
- (CGSize)sizeThatFits:(CGSize)value
Parameters
- value
The size context.
Return Value
The “natural” size of this view within the size.
Discussion
Return the “natural” size of the contents of this panel within the context of a given size.
See [UIView sizeThatFits:] and the discussion at [WePanelLayout sizeThatFits:layer:].
Declared In
WePanel.h
updateHAlign:vAlign:
Sets the horizontal and vertical alignment of all layers in this panel.
- (WePanel *)updateHAlign:(HAlign)hAlignValue vAlign:(VAlign)vAlignValue
Parameters
- hAlignValue
The horizontal align value.
- vAlignValue
The vertical align value.
Return Value
Itself, for chaining.
Discussion
Sets the horizontal and vertical alignment of all layers in this panel.
Only affects existing layers of this panel.
Declared In
WePanel.h
updateHMargin:vMargin:
Sets the horizontal and vertical margin of all layers in this panel.
- (WePanel *)updateHMargin:(int)hMarginValue vMargin:(int)vMarginValue
Parameters
- hMarginValue
The horizontal margin value.
- vMarginValue
The vertical margin value.
Return Value
Itself, for chaining.
Discussion
Sets the horizontal and vertical margin of all layers in this panel.
Only affects existing layers of this panel.
Declared In
WePanel.h
withEmptyNaturalSize
If invoked, the “natural” size returned by [UIView sizeThatFits:] is zero.
- (id)withEmptyNaturalSize
Return Value
Itself, for chaining.
Discussion
If invoked, the “natural” size returned by [UIView sizeThatFits:] is zero.
Declared In
WePanel.h
withFixedSize:
Sets a fixed natural size of this view.
- (WePanel *)withFixedSize:(CGSize)value
Parameters
- value
The size value.
Return Value
Itself, for chaining.
Discussion
Sets a fixed natural size of this view.
Declared In
WePanel.h


CubeRover: Embedded Systems
Summary
I first explored embedded systems programming through this class
project partnered with the space exploration startup,
Astrobotic. In space, the sun can emit radiation strong enough to flip bits in data and thus corrupt our
entire robot. In the worse case, this can cut all our communications with the robot and end the mission.
As a backup for this situation,I created a "watchdog" to detect this system failure and automatically reset
the robot to hopefully revive communications. I used the
MSP430
as an SPI slave to read heartbeat-like signals and detect anomalies from the robot's main modules.
System Architecture
Learning Embedded Systems
Normally in programming, I expect to see exactly where a variable will be used. When changing status registers to control the MSP430, however, I struggled with the concept of changing a global variable that didn't seem to be used anywhere. I was able to better understand after reading block diagrams of these registers in circuits. Overall, I needed to change the functionality of pins on the MSP430 and choose which internal clock to use.
Serial Peripheral Interface (SPI)
SPI is a form of synchronous communication, meaning its message bits are aligned with an clock. The main image at the top displays this protocol. As my first taste of embedded systems, I struggled with the concept of changing status register bits to control functionality of the chip. I also gained experience reading extensive documentation of software and hardware.
Watchdog: Anomaly Detection
I implemented a basic system to detect anomalies in heartbeat messages sent through SPI. Each hearbeat message contained a series of bytes of a specific order and if a certain percent of these bytes were different than expected, the system would flash an LED to represent switching off and back on power to the robot as a whole. This certainly was not a perfect system, but served as a basic demonstration of future functionality.


| Modifier and Type | Class and Description |
|---|---|
class |
Assasin |
class |
Beserker |
class |
Cleric |
class |
Defender |
class |
Duelist |
class |
Hero |
class |
Manticore |
class |
Monk
The monk by default has a dodge chance of 33%.This is the specialty of the monk.
|
class |
Monster |
class |
Mummy |
class |
Ogre
The Class defines a monster Ogre who inherits the same characteristics as a monster.
|
class |
Orc
Orc is a special monster that can double its attack power on knocking out an opponent
and get healed.
|
class |
Paladin |
class |
Rogue |
class |
Slime |
class |
Spider |
class |
Warrior |
| Modifier and Type | Method and Description |
|---|---|
void |
Spider.attack(Role opponent)
The attack of the spider is redefined as the spider can either attack or poison (a 50% chance of each)
When attacked an opponent can retaliate but when poisoned by Spider they can't.
|
void |
Slime.attack(Role opponent)
This function changes the skip and goo parameter of the victim of Slime.
|
void |
Role.attack(Role opponent)
A default function of attack
|
void |
Rogue.attack(Role opponent)
The specialty of Rogue is that , a Rogue can poison a monster for 3 turns
i.e set poison to 3 .There are more if statements for better string outputs
to make the story more precise.
|
void |
Orc.attack(Role opponent) |
void |
Mummy.attack(Role opponent) |
void |
Monster.attack(Role opponent)
This is a simple function of attack where the poison is checked and the opponent gets attacked.
|
void |
Hero.attack(Role opponent)
Function Attack of a hero needs to check if they are to skip a turn and also it helps to
un-tag heroes from the "(goo)" tag.
|
void |
Cleric.attack(Role hero)
Redefined attack, as the Cleric heals instead of attacking.The function removes all tags,
and all parameters are rest to default state.This function is similar to stage revive but
to make the game more interactive the function has differnt strings to display.
|
void |
Beserker.attack(Role opponent) |
void |
Role.getAttacked(Role opponent)
Helps to judge the characters dodge capability and it is the main function used to define
attack in sub classes of Role.This is function is the opposite of attack where the function
decides what the Role that gets attacked does.
|
void |
Monster.getAttacked(Role opponent)
Though getAttacked is nearly the same function in monsters compared to Role class, to change the strings that are displayed,
the the method has been redefined.
|
void |
Defender.getAttacked(Role opponent) |
void |
Role.retalliation(Role opponent)
The function judges the retaliation capability.
|


Event Detail
Event
{{EventName}}
Site Name
{{SiteName}}
Start Date
{{StartDate}}
EndDate
{{EndDate}}
Ticket Remaining
{{TicketRemaining}}
Ticket Price
{{price}}
Description
{{Description}}
Log Visit
Back
{{error}}
{{success}}


Home
About Our Team
Translate
Map
Sentiment Analysis
Type a message and click submit to analyze its sentiment:
Submit