-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added maxPacketParts method to the Network Card #2298
Added maxPacketParts method to the Network Card #2298
Conversation
I'd prefer this to go into the device info (hence the "todo remove" comment on the other, similar method). As for the attribute name, I suppose "width" could do? But feel free to use something more specific. |
It's worth noting that I feel like it should be on the network card component because it's like the MTU of real networks? |
Not sure what your point is? The device info is still part of the network card component. |
I'm sorry... I don't really know what you're talking about with regards to "device info", as there doesn't seem to be anything on http://ocdoc.cil.li? |
This is the device info. |
So how would that work? Would I add a new device attribute and set it to the value, similar to what is there? What should that attribute be called? |
Yes, exactly. |
@@ -48,7 +48,8 @@ class NetworkCard(val host: EnvironmentHost) extends prefab.ManagedEnvironment w | |||
DeviceAttribute.Description -> "Ethernet controller", | |||
DeviceAttribute.Vendor -> Constants.DeviceInfo.DefaultVendor, | |||
DeviceAttribute.Product -> "42i520 (MPN-01)", | |||
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString | |||
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString, | |||
DeviceAttribute.MaxParts -> Settings.get.maxNetworkPacketParts.toString |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the indentation here.
@@ -69,7 +69,8 @@ | |||
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk | |||
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component | |||
public static final String Width = "width"; // address width of the device, in the broadest sense | |||
|
|||
public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the indentation here. I don't like the attribute name, but I can't think of anything other than @fnuecke's "width" either.
@@ -69,7 +69,8 @@ | |||
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk | |||
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component | |||
public static final String Width = "width"; // address width of the device, in the broadest sense | |||
|
|||
public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another formatting error. Remove the spaces.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already done. Notepad++ Is rather stupid when it comes to Tabs vs Spaces.
) | ||
DeviceAttribute.Capacity -> Settings.get.maxNetworkPacketSize.toString, | ||
DeviceAttribute.MaxParts -> Settings.get.maxNetworkPacketParts.toString | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still not formatted properly.
@@ -69,7 +69,7 @@ | |||
public static final String Size = "size"; // actual size of the device, e.g. actual usable space on a disk | |||
public static final String Clock = "clock"; // bus clock (in Hz) of the device, e.g. call speed(s) of a component | |||
public static final String Width = "width"; // address width of the device, in the broadest sense | |||
|
|||
public static final String MaxParts = "maxparts"; // Maximum number of parts for, e.g. a network packet. | |||
private DeviceAttribute() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And an empty line here, please.
Ref #2294